Example #1
0
 /**
  * 初始化当前项目的路由
  */
 protected static function init_regex()
 {
     if (isset(Route::$regex[Core::$project])) {
         return null;
     }
     Route::$regex[Core::$project] = array();
     # 获取路由配置
     $route = Core::config('route');
     # 如果有
     if ($route) {
         # 构造路由正则
         foreach ($route as $k => $v) {
             Route::$regex[Core::$project][$k] = Route::_compile($v);
         }
     }
 }