private static function _preventLoop($location) { if (request::isGet() && $location === request::getReferer() && $location === request::getUri()) { self::setStatus(500); exit; } }
public function setBaseUri($uri) { $requestUri = request::getUri(); $requestUri = reset(explode('?', $requestUri)); $this->_baseUrl = $uri; $this->_rel = dirname(substr($requestUri, strlen($this->_baseUrl))); return $this; }
public function __construct($parentRoute = null) { if (null === $parentRoute) { $urla = explode('?', request::getUri()); $this->_requestPath = new path($urla[0]); } else { $this->_requestPath = $parentRoute->getRequestPath(); $this->setBasePath($parentRoute->getBasePath()); } }
/** * Make uri object from $_SERVER['REQUEST_URI'] * @return uri */ public static function fromRequestUri() { return uri::fromString(request::getUri()); }