getPort() public method

Returns the port of the URI
public getPort ( ) : integer
return integer Port
 /**
  * @test
  */
 public function toStringOmitsStandardPorts()
 {
     $uri = new Uri('http://flow.neos.io');
     $this->assertSame('http://flow.neos.io', (string) $uri);
     $this->assertSame(80, $uri->getPort());
     $uri = new Uri('https://flow.neos.io');
     $this->assertSame('https://flow.neos.io', (string) $uri);
     $this->assertSame(443, $uri->getPort());
 }
Esempio n. 2
0
 /**
  * Returns the port used for this request
  *
  * @return integer
  * @api
  */
 public function getPort()
 {
     return $this->uri->getPort();
 }