public function getPort()
    {
        if (empty($this->port)) {
            if (array_key_exists($this->scheme, static::$defaultPorts)) {
                return static::$defaultPorts[$this->scheme];
            }
        }

        return $this->port;
    }
public function getPort()
    {
        if (empty($this->port)) {
            if (array_key_exists($this->scheme, static::$defaultPorts)) {
                return static::$defaultPorts[$this->scheme];
            }
        }

        return $this->port;
    }
public function getPort ( ) { if ( empty ( $ this -> port ) ) { if ( array_key_exists ( $ this -> scheme , static :: $ defaultPorts ) ) { return static :: $ defaultPorts [ $ this -> scheme ] ; } } return $ this -> port ; }
Return the URI port

If no port is set, will return the default port according to the scheme

@return integer
Return the URI port