예제 #1
0
파일: UrlTest.php 프로젝트: snikch/ergo
 public function testBriefHttpUrlUsage()
 {
     $url = new Ergo_Http_Url('http://example.org/');
     $this->assertEqual($url->getHostRelativeUrl(), '/');
     $this->assertEqual($url->getSchemeRelativeUrl(), '//example.org/');
 }
예제 #2
0
 /**
  * The path of the URI, which may or may not already be path-only.
  * @param string $uri
  * @return string
  */
 private function _uriRelativeToHost($uri)
 {
     $uri = new Ergo_Http_Url($uri);
     return $uri->getHostRelativeUrl();
 }