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; }
public function testIsRemoteIP() { $oUrl = new Url(); $oUrl->setHost('8.8.8.8'); $this->assertFalse($oUrl->isLocal()); }