Ejemplo n.º 1
0
 private static function _preventLoop($location)
 {
     if (request::isGet() && $location === request::getReferer() && $location === request::getUri()) {
         self::setStatus(500);
         exit;
     }
 }
Ejemplo n.º 2
0
 public function setBaseUri($uri)
 {
     $requestUri = request::getUri();
     $requestUri = reset(explode('?', $requestUri));
     $this->_baseUrl = $uri;
     $this->_rel = dirname(substr($requestUri, strlen($this->_baseUrl)));
     return $this;
 }
Ejemplo n.º 3
0
 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());
     }
 }
Ejemplo n.º 4
0
 /**
  * Make uri object from $_SERVER['REQUEST_URI']
  * @return uri
  */
 public static function fromRequestUri()
 {
     return uri::fromString(request::getUri());
 }