Exemplo n.º 1
0
 public function getCompleteParentUri($bFull = false, $iSteps = 1)
 {
     if (empty($this->sUrl)) {
         return '';
     }
     if (!$this->oUrl->isLocal()) {
         $sUrl = ($this->oUrl->getScheme() ? $this->oUrl->getScheme() . ':' : '') . '//';
         $sUrl .= $this->getSiteUri();
     } else {
         $sUrl = '';
         if ($bFull) {
             $sUrl = ($this->oUrl->getScheme() ? $this->oUrl->getScheme() . ':' : '') . '//';
         }
     }
     $sUrl .= $this->getParentPath($iSteps);
     $sUrl .= $this->getFullQueryString();
     $sUrl .= $this->getFullFragmentString();
     return $sUrl;
 }
Exemplo n.º 2
0
 public function testIsRemoteIP()
 {
     $oUrl = new Url();
     $oUrl->setHost('8.8.8.8');
     $this->assertFalse($oUrl->isLocal());
 }