コード例 #1
0
ファイル: Route.php プロジェクト: elegantweb/framework
 /**
  * Sets the route host.
  *
  * @param string $host URI host
  */
 public final function setHost($host)
 {
     Uri::validateHost($host);
     $this->host = Uri::standardlizeHost($host);
 }
コード例 #2
0
ファイル: UriTest.php プロジェクト: elegantweb/framework
 public function testWithPathForSamePath()
 {
     $uri = new Uri('https://*****:*****@local.example.com:3001/foo?bar=baz#quz');
     $new = $uri->withPath('/foo');
     $this->assertNotSame($uri, $new);
     $this->assertEquals('/foo', $new->getPath());
     $this->assertEquals('https://*****:*****@local.example.com:3001/foo?bar=baz#quz', (string) $new);
 }