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