コード例 #1
0
ファイル: Server.php プロジェクト: floffel03/pydio-core
 /**
  * Gets the uri for the request, keeping the base uri into consideration
  *
  * @return string
  */
 public function getRequestUri()
 {
     return $this->calculateUri($this->httpRequest->getUri());
 }
コード例 #2
0
 /**
  * returns protocol + hostname
  * 
  * @return string
  */
 public static function getHostname()
 {
     $hostname = self::get('HOSTNAME');
     if (!$hostname) {
         $request = new Sabre\HTTP\Request();
         $hostname = strlen($request->getUri()) > 1 ? str_replace($request->getUri(), '', $request->getAbsoluteUri()) : $request->getAbsoluteUri();
         self::set('HOSTNAME', $hostname);
     }
     return $hostname;
 }
コード例 #3
0
ファイル: RequestTest.php プロジェクト: samj1912/repo
 function testGetUri()
 {
     $this->assertEquals('/testuri/', $this->request->getUri(), 'We got an invalid uri back');
 }