HTTPConnection::getPort PHP Method

getPort() public method

public getPort ( ) : integer
return integer
    public function getPort()
    {
        if ($this->initialized) {
            return $this->port;
        } else {
            throw new BadMethodCallException('Conexão não inicializada');
        }
    }

Usage Example

 public function open(HTTPConnection $httpConnection)
 {
     $error = null;
     $errno = 0;
     $this->handler = fsockopen($httpConnection->getHost(), $httpConnection->getPort(), $errno, $error, $httpConnection->getConnectionTimeout());
 }