public function getDefaultPort()
    {
        if (!$this->hasDefaultPort()) throw new UrlException(sprintf(
            "No default port for URL '%s'",
            $this->_inputString
        ));

        $scheme = $this->getScheme();
        if ($scheme == 'http') return 80;
        elseif ($scheme == 'https') return 443;
        else throw new UrlException("No default port for scheme '$scheme'");
    }
public function getDefaultPort()
    {
        if (!$this->hasDefaultPort()) throw new UrlException(sprintf(
            "No default port for URL '%s'",
            $this->_inputString
        ));

        $scheme = $this->getScheme();
        if ($scheme == 'http') return 80;
        elseif ($scheme == 'https') return 443;
        else throw new UrlException("No default port for scheme '$scheme'");
    }
public function getDefaultPort ( ) { if ( ! $ this -> hasDefaultPort ( ) ) throw new UrlException ( sprintf ( "No default port for URL '%s'" , $ this -> _inputString ) ) ; $ scheme = $ this -> getScheme ( ) ; if ( $ scheme == 'http' ) return 80 ; elseif ( $ scheme == 'https' ) return 443 ; else throw new UrlException ( "No default port for scheme '$scheme'" ) ; }
The default TCP port for the scheme of the URL
@return int or null
The default TCP port for the scheme of the URL