/** * 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; }
/** * * @param array $path */ public static function setPath(array $path) { self::$_path = $path; }