src/Core/Router.php
function parseRouter(array $request, array $url_config)
    {
        $combine_alias_key = '';
        $ori_controller = $controller = array_shift($request);
        if (isset($request[0])) {
            $combine_alias_key = $controller . ':' . $request[0];
        }

        $controller_alias = '';
        $router_config = $this->config->get('router');
        if (isset($router_config [$combine_alias_key])) {
            array_shift($request);
            $controller_alias = $router_config [$combine_alias_key];
        } elseif (isset($router_config [$controller])) {
            $controller_alias = $router_config [$controller];
        }

        if (!empty($controller_alias)) {
            if (false !== strpos($controller_alias, ':')) {
                list($controller, $action) = explode(':', $controller_alias);
            } else {
                $controller = $controller_alias;
            }
        }

        $ori_action = '';
        if (!isset($action)) {
            if (isset($request[0]) && !empty($request[0])) {
                $ori_action = $action = array_shift($request);
            } else {
                $action = self::DEFAULT_ACTION;
            }
        }

        $addition_params = array();
        $params = $this->parseParams($request, $url_config, $addition_params);
        $this->config->set('ori_router', array(
            'request' => $this->originUriRequest,
            'addition_params' => $addition_params,
            'controller' => $ori_controller,
            'action' => $ori_action,
            'params' => $request,
        ));

        $this->setController($controller);
        $this->setAction($action);
        $this->setParams($params);
    }
function parseRouter(array $request, array $url_config)
    {
        $combine_alias_key = '';
        $ori_controller = $controller = array_shift($request);
        if (isset($request[0])) {
            $combine_alias_key = $controller . ':' . $request[0];
        }

        $controller_alias = '';
        $router_config = $this->config->get('router');
        if (isset($router_config [$combine_alias_key])) {
            array_shift($request);
            $controller_alias = $router_config [$combine_alias_key];
        } elseif (isset($router_config [$controller])) {
            $controller_alias = $router_config [$controller];
        }

        if (!empty($controller_alias)) {
            if (false !== strpos($controller_alias, ':')) {
                list($controller, $action) = explode(':', $controller_alias);
            } else {
                $controller = $controller_alias;
            }
        }

        $ori_action = '';
        if (!isset($action)) {
            if (isset($request[0]) && !empty($request[0])) {
                $ori_action = $action = array_shift($request);
            } else {
                $action = self::DEFAULT_ACTION;
            }
        }

        $addition_params = array();
        $params = $this->parseParams($request, $url_config, $addition_params);
        $this->config->set('ori_router', array(
            'request' => $this->originUriRequest,
            'addition_params' => $addition_params,
            'controller' => $ori_controller,
            'action' => $ori_action,
            'params' => $request,
        ));

        $this->setController($controller);
        $this->setAction($action);
        $this->setParams($params);
    }
解析router别名配置

@param array $request
@param array $url_config
@internal param $router