Esempio n. 1
0
 public function testBriefHttpUrlUsage()
 {
     $url = new Ergo_Http_Url('http://example.org/');
     $this->assertEqual($url->getHostRelativeUrl(), '/');
     $this->assertEqual($url->getSchemeRelativeUrl(), '//example.org/');
 }
Esempio n. 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();
 }