public function setProtocolVersion(string $version)
	{
		if (! is_numeric($version))
		{
			$version = substr($version, strpos($version, '/') + 1);
		}

		if (! in_array($version, $this->validProtocolVersions))
		{
			throw HTTPException::forInvalidHTTPProtocol(implode(', ', $this->validProtocolVersions));
		}

		$this->protocolVersion = $version;

		return $this;
	}
public function setProtocolVersion(string $version)
	{
		if (! is_numeric($version))
		{
			$version = substr($version, strpos($version, '/') + 1);
		}

		if (! in_array($version, $this->validProtocolVersions))
		{
			throw HTTPException::forInvalidHTTPProtocol(implode(', ', $this->validProtocolVersions));
		}

		$this->protocolVersion = $version;

		return $this;
	}
public function setProtocolVersion ( string $ version ) { if ( ! is_numeric ( $ version ) ) { $ version = substr ( $ version , strpos ( $ version , '/' ) + 1 ) ; } if ( ! in_array ( $ version , $ this -> validProtocolVersions ) ) { throw HTTPException :: forInvalidHTTPProtocol ( implode ( ', ' , $ this -> validProtocolVersions ) ) ; } $ this -> protocolVersion = $ version ; return $ this ; }
Sets the HTTP protocol version.

@param string $version

@return Message
Sets the HTTP protocol version .