public function getPort()
    {
        if ($this->port) {
            return $this->port;
        } elseif (isset(self::$defaultPorts[$this->scheme])) {
            return self::$defaultPorts[$this->scheme];
        }

        return null;
    }
public function getPort()
    {
        if ($this->port) {
            return $this->port;
        } elseif (isset(self::$defaultPorts[$this->scheme])) {
            return self::$defaultPorts[$this->scheme];
        }

        return null;
    }
public function getPort ( ) { if ( $ this -> port ) { return $ this -> port ; } elseif ( isset ( self :: $ defaultPorts [ $ this -> scheme ] ) ) { return self :: $ defaultPorts [ $ this -> scheme ] ; } return null ; }
Get the port part of the URl.

If no port was set, this method will return the default port for the
scheme of the URI.

@return int|null
Get the port part of the URl .