src/MVC/View.php
protected function makeParams(array $params, array $url_config, $encrypt_params = false, $add_prefix_dot = true)
    {
        $url_dot = &$url_config['dot'];
        $params_dot = &$url_config['params_dot'];
        if ($params_dot) {
            $dot = $params_dot;
        } else {
            $dot = $url_dot;
        }

        $url_params = '';
        if ($params) {
            switch ($url_config['type']) {
                case 1:
                case 5:
                    $url_params = implode($dot, $params);
                    break;

                case 2:
                    $url_dot = '?';
                    $add_prefix_dot = true;
                    $url_params = http_build_query($params);
                    break;

                case 3:
                case 4:
                    foreach ($params as $p_key => $p_val) {
                        $url_params .= $p_key . $dot . $p_val . $dot;
                    }
                    $url_params = rtrim($url_params, $dot);
                    break;
            }

            if (true === $encrypt_params) {
                $url_params = $this->urlEncrypt($url_params);
            }
        }

        if ($add_prefix_dot) {
            return $url_dot . $url_params;
        }

        return $url_params;
    }
protected function makeParams(array $params, array $url_config, $encrypt_params = false, $add_prefix_dot = true)
    {
        $url_dot = &$url_config['dot'];
        $params_dot = &$url_config['params_dot'];
        if ($params_dot) {
            $dot = $params_dot;
        } else {
            $dot = $url_dot;
        }

        $url_params = '';
        if ($params) {
            switch ($url_config['type']) {
                case 1:
                case 5:
                    $url_params = implode($dot, $params);
                    break;

                case 2:
                    $url_dot = '?';
                    $add_prefix_dot = true;
                    $url_params = http_build_query($params);
                    break;

                case 3:
                case 4:
                    foreach ($params as $p_key => $p_val) {
                        $url_params .= $p_key . $dot . $p_val . $dot;
                    }
                    $url_params = rtrim($url_params, $dot);
                    break;
            }

            if (true === $encrypt_params) {
                $url_params = $this->urlEncrypt($url_params);
            }
        }

        if ($add_prefix_dot) {
            return $url_dot . $url_params;
        }

        return $url_params;
    }
生成uri参数字符串

@param array $params 当url_type的值不为2时, 值必须是标量(bool型需要在外部转换为int型)
@param array $url_config
@param bool $encrypt_params
@param bool $add_prefix_dot 当控制器字符串为空时,参数不添加前缀
@return string