Example #1
0
 /**
  * Gets the path
  *
  * @return string
  */
 public static function path()
 {
     if (self::$_path === false) {
         $location = trim(App::location(), '/');
         if ($location != '' && strrpos($location, '/') != strlen($location) - 1) {
             $location .= '/';
         }
         $location = str_replace('/', '\\/', $location);
         $rx = '(?:(?:^(' . $location . ')index\\.php$)|(?:^(' . $location . ')index\\.php\\/))';
         self::$_path = preg_replace('/' . $rx . '/', '$1$2', trim($_SERVER['REQUEST_URI'], '/'));
     }
     return self::$_path;
 }
Example #2
0
 /**
  *
  * @param array $path
  */
 public static function setPath(array $path)
 {
     self::$_path = $path;
 }