public function setURI(string $uri = null)
	{
		if (! is_null($uri))
		{
			$parts = parse_url($uri);

			if ($parts === false)
			{
				throw HTTPException::forUnableToParseURI($uri);
			}

			$this->applyParts($parts);
		}

		return $this;
	}
public function setURI(string $uri = null)
	{
		if (! is_null($uri))
		{
			$parts = parse_url($uri);

			if ($parts === false)
			{
				throw HTTPException::forUnableToParseURI($uri);
			}

			$this->applyParts($parts);
		}

		return $this;
	}
public function setURI ( string $ uri = null ) { if ( ! is_null ( $ uri ) ) { $ parts = parse_url ( $ uri ) ; if ( $ parts === false ) { throw HTTPException :: forUnableToParseURI ( $ uri ) ; } $ this -> applyParts ( $ parts ) ; } return $ this ; }
Sets and overwrites any current URI information.

@param string|null $uri

@return URI
Sets and overwrites any current URI information .