Phly\Http\MessageTrait::withProtocolVersion PHP 메소드

withProtocolVersion() 공개 메소드

The version string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the new protocol version.
public withProtocolVersion ( string $version ) : self
$version string HTTP protocol version
리턴 self
    public function withProtocolVersion($version)
    {
        $new = clone $this;
        $new->protocol = $version;
        return $new;
    }