protected function addHostHeader(UriInterface $uri)
    {
        $host = $uri->getHost();
        if ($port = $uri->getPort()) {
            $host = sprintf('%s:%s', $host, $port);
        }

        $this->headers['host'] = array($host);
    }
protected function addHostHeader(UriInterface $uri)
    {
        $host = $uri->getHost();
        if ($port = $uri->getPort()) {
            $host = sprintf('%s:%s', $host, $port);
        }

        $this->headers['host'] = array($host);
    }
protected function addHostHeader ( UriInterface $ uri ) { $ host = $ uri -> getHost ( ) ; if ( $ port = $ uri -> getPort ( ) ) { $ host = sprintf ( '%s:%s' , $ host , $ port ) ; } $ this -> headers [ 'host' ] = array ( $ host ) ; }
Build host.

@param UriInterface $uri
Build host .