Пример #1
0
 protected static function _checkLocations($locations)
 {
     $env = App::option('modules.env');
     $uri = str_replace($env, '', $_SERVER['REQUEST_URI']);
     foreach ($locations as $k => $v) {
         if (0 === strpos($uri, $k)) {
             static::$_currentLocation = $k;
             static::_create($v);
             break;
             // only 1 location
         }
     }
 }
Пример #2
0
 /**
  *
  */
 public static function env()
 {
     return $env = '/' === substr(App::option('app.env'), -1) ? substr(App::option('app.env'), 0, -1) : App::option('app.env');
 }