public function withPortAndArg() { $t = HttpTransport::transportFor(new URL('test+v2://example.com:443')); $this->assertEquals('example.com', $t->host); $this->assertEquals(443, $t->port); $this->assertEquals('v2', $t->arg); }
/** * Constructor * * @param var url a string or a peer.URL object */ public function __construct($url) { $this->url = $url instanceof URL ? $url : new URL($url); $this->transport = HttpTransport::transportFor($this->url); }