src/fkooman/Http/Url.php
public function getAuthority()
    {
        $scheme = $this->getScheme();
        $serverName = $this->getHost();
        $serverPort = $this->getPort();

        $authority = sprintf('%s://%s', $scheme, $serverName);
        if (('https' === $scheme && 443 !== $serverPort) || ('http' === $scheme && 80 !== $serverPort)) {
            $authority .= sprintf(':%d', $serverPort);
        }

        return $authority;
    }
public function getAuthority()
    {
        $scheme = $this->getScheme();
        $serverName = $this->getHost();
        $serverPort = $this->getPort();

        $authority = sprintf('%s://%s', $scheme, $serverName);
        if (('https' === $scheme && 443 !== $serverPort) || ('http' === $scheme && 80 !== $serverPort)) {
            $authority .= sprintf(':%d', $serverPort);
        }

        return $authority;
    }
public function getAuthority ( ) { $ scheme = $ this -> getScheme ( ) ; $ serverName = $ this -> getHost ( ) ; $ serverPort = $ this -> getPort ( ) ; $ authority = sprintf ( '%s://%s' , $ scheme , $ serverName ) ; if ( ( 'https' === $ scheme && 443 !== $ serverPort ) || ( 'http' === $ scheme && 80 !== $ serverPort ) ) { $ authority .= sprintf ( ':%d' , $ serverPort ) ; } return $ authority ; }
Get the authority part of the URL. That is, the scheme, host and
optional port if it is not a standard port.

@return string the authority part of the URL
Get the authority part of the URL . That is the scheme host and optional port if it is not a standard port .