src/Url.php
public function withHost(HostInterface $host): UrlInterface
    {
        return new self($this->myScheme, $host, $this->myPort, $this->myPath, $this->myQueryString, $this->myFragment);
    }
public function withHost(HostInterface $host): UrlInterface
    {
        return new self($this->myScheme, $host, $this->myPort, $this->myPath, $this->myQueryString, $this->myFragment);
    }
public function withHost ( HostInterface $ host ) : UrlInterface { return new self ( $ this -> myScheme , $ host , $ this -> myPort , $ this -> myPath , $ this -> myQueryString , $ this -> myFragment ) ; }
Returns a copy of the Url instance with the specified host.

@since 1.0.0

@param HostInterface $host The host.

@return UrlInterface The Url instance.
Returns a copy of the Url instance with the specified host .