src/Core/FrameBase.php
protected function sParams($use_annotate = true, $params = null)
    {
        $config = $this->getConfig();
        $addition_params = $config->get('ori_router', 'addition_params');
        if (empty($addition_params)) {
            $addition_params = array();
        }

        $url_config = $config->get('url');
        if (null === $params) {
            $ori_params = $config->get('ori_router', 'params');
            switch ($url_config['type']) {
                case 2:
                    $params = current(array_keys($ori_params));
                    array_shift($addition_params);
                    break;

                default:
                    if (is_array($ori_params)) {
                        $params = array_shift($ori_params);
                    } else {
                        $params = $ori_params;
                    }
            }
        }

        $decode_params_str = false;
        if (is_string($params)) {
            $decode_params_str = $this->urlEncrypt($params, 'decode');
        }

        if (false == $decode_params_str) {
            if ($params !== null) return $params;
            return $this->params;
        }

        $op_type = 2;
        $ori_result = array();
        if (!empty($url_config['params_dot'])) {
            $url_dot = &$url_config['params_dot'];
        } else {
            $url_dot = &$url_config['dot'];
        }

        switch ($url_config['type']) {
            case 1:
            case 5:
                $op_type = 1;
                $ori_result = explode($url_dot, $decode_params_str);
                break;
            case 2:
                parse_str($decode_params_str, $ori_result);
                break;
            case 3:
            case 4:
                $ori_result = Application::stringParamsToAssociativeArray($decode_params_str, $url_dot);
                break;
        }

        if (!empty($this->action_annotate['params']) && $use_annotate) {
            $result = Application::combineParamsAnnotateConfig($ori_result, $this->action_annotate['params'], $op_type);
        } else {
            $result = $ori_result;
        }

        if (!empty($addition_params) && is_array($addition_params)) {
            $result += $addition_params;
        }

        return $result;
    }
protected function sParams($use_annotate = true, $params = null)
    {
        $config = $this->getConfig();
        $addition_params = $config->get('ori_router', 'addition_params');
        if (empty($addition_params)) {
            $addition_params = array();
        }

        $url_config = $config->get('url');
        if (null === $params) {
            $ori_params = $config->get('ori_router', 'params');
            switch ($url_config['type']) {
                case 2:
                    $params = current(array_keys($ori_params));
                    array_shift($addition_params);
                    break;

                default:
                    if (is_array($ori_params)) {
                        $params = array_shift($ori_params);
                    } else {
                        $params = $ori_params;
                    }
            }
        }

        $decode_params_str = false;
        if (is_string($params)) {
            $decode_params_str = $this->urlEncrypt($params, 'decode');
        }

        if (false == $decode_params_str) {
            if ($params !== null) return $params;
            return $this->params;
        }

        $op_type = 2;
        $ori_result = array();
        if (!empty($url_config['params_dot'])) {
            $url_dot = &$url_config['params_dot'];
        } else {
            $url_dot = &$url_config['dot'];
        }

        switch ($url_config['type']) {
            case 1:
            case 5:
                $op_type = 1;
                $ori_result = explode($url_dot, $decode_params_str);
                break;
            case 2:
                parse_str($decode_params_str, $ori_result);
                break;
            case 3:
            case 4:
                $ori_result = Application::stringParamsToAssociativeArray($decode_params_str, $url_dot);
                break;
        }

        if (!empty($this->action_annotate['params']) && $use_annotate) {
            $result = Application::combineParamsAnnotateConfig($ori_result, $this->action_annotate['params'], $op_type);
        } else {
            $result = $ori_result;
        }

        if (!empty($addition_params) && is_array($addition_params)) {
            $result += $addition_params;
        }

        return $result;
    }
还原加密后的参数

@param bool $use_annotate
@param string $params
@return bool|string