/** * 根据路径信息获取路由配置 * @param string $pathinfo */ public function get($pathinfo) { if (!isset(Core_Route::$regex[Core::$project][Core::$project])) { # 构造路由正则 $this->_comp(); } foreach (Core_Route::$regex[Core::$project] as $k => $v) { if (isset(Core_Route::$route[$k]['for'])) { if (Core_Route::$route[$k]['for'] != Core::$project_url) { # 如果路由不是为当前url设置的则或略 continue; } } $preg = Core_Route::_matches($pathinfo, $k); if ($preg) { Core_Route::$last_route = $k; return $preg; } } return false; }