core/Route.php
public static function getMapping(string $url = null)
    {
        $url = self::parse($url);
        if (self::$route == null) {
            throw new RouteError('未初始化路由参数,url:' . $url);
        }
        if (empty(self::$route['app'])) {
            throw new RouteError('路由应用名称 app 为空,url:' . $url);
        }
        if (empty(self::$route['ctl'])) {
            throw new RouteError('路由控制器名称 ctl 为空,url:' . $url);
        }
        if (empty(self::$route['act'])) {
            throw new RouteError('路由方法名称 act 为空,url:' . $url);
        }

        $ctl = Utils::toCamel(self::$route['ctl']);
        $act = Utils::toCamel(self::$route['act']);
        $act = lcfirst($act);
        $appPath = self::getPath();
        if (empty($appPath)) {
            throw new RouteError('没有设置应用目录,url:' . $url);
        }
        //设置当前应用下的配置文件
        $config = Utils::path($appPath, 'config.php');
        if (file_exists($config)) {
            $cfgData = Config::loadFile($config);
            foreach ($cfgData as $key => $val) {
                Config::set($key, $val);
            }
        }
        //开始进入入口---------------------
        $namespace = self::getNamespace();
        return [
            'namespace' => $namespace,
            'classFullName' => $namespace . '\\controller\\' . $ctl,
            'className' => $ctl,
            'method' => $act . 'Action'
        ];
    }
public static function getMapping(string $url = null)
    {
        $url = self::parse($url);
        if (self::$route == null) {
            throw new RouteError('未初始化路由参数,url:' . $url);
        }
        if (empty(self::$route['app'])) {
            throw new RouteError('路由应用名称 app 为空,url:' . $url);
        }
        if (empty(self::$route['ctl'])) {
            throw new RouteError('路由控制器名称 ctl 为空,url:' . $url);
        }
        if (empty(self::$route['act'])) {
            throw new RouteError('路由方法名称 act 为空,url:' . $url);
        }

        $ctl = Utils::toCamel(self::$route['ctl']);
        $act = Utils::toCamel(self::$route['act']);
        $act = lcfirst($act);
        $appPath = self::getPath();
        if (empty($appPath)) {
            throw new RouteError('没有设置应用目录,url:' . $url);
        }
        //设置当前应用下的配置文件
        $config = Utils::path($appPath, 'config.php');
        if (file_exists($config)) {
            $cfgData = Config::loadFile($config);
            foreach ($cfgData as $key => $val) {
                Config::set($key, $val);
            }
        }
        //开始进入入口---------------------
        $namespace = self::getNamespace();
        return [
            'namespace' => $namespace,
            'classFullName' => $namespace . '\\controller\\' . $ctl,
            'className' => $ctl,
            'method' => $act . 'Action'
        ];
    }
获取映射信息
@param string|null $url
@return array
@throws RouteError