@param array $parameters

@return string
518630
public function render(array $parameters = []): string
    {
        return $this->twig->render($this->template, $parameters + $this->parameters);
    }
1146161
private function calculateStringToSignV2(array $parameters)
    {
        $data = 'POST';
        $data .= "\n";
        $data .= $this->mwsEndpointUrl;
        $data .= "\n";
        $data .= $this->mwsEndpointPath;
        $data .= "\n";
        $data .= $this->getParametersAsString($parameters);

        $this->logMessage($this->sanitizeRequestData($data));

        return $data;
    }
685589
protected function parseNamedParameters($parameters)
    {
        return array_reduce($parameters, function ($result, $item) {
            [$key, $value] = array_pad(explode('=', $item, 2), 2, null);

            $result[$key] = $value;

            return $result;
        });
    }
1060167
private function extractMessageClass(array $parameters): string
    {
        if (0 === \count($parameters))
        {
            throw InvalidHandlerArguments::emptyArguments();
        }

        /** @var \ReflectionParameter $firstArgument */
        $firstArgument = $parameters[0];

        if (null !== $firstArgument->getType())
        {
            /** @var \ReflectionType $type */
            $type = $firstArgument->getType();

            /** @psalm-var class-string $className */
            $className = $type->getName();

            /** @psalm-suppress RedundantConditionGivenDocblockType */
            if (true === \class_exists($className))
            {
                return $className;
            }
        }

        throw InvalidHandlerArguments::invalidFirstArgument();
    }
419006
public function invoke(array $parameters): string
    {
        $string = '';
        foreach ($parameters as $parameter) {
            $string .= $parameter . ', ';
        }
        return substr($string, 0, -2);
    }
1044257
protected function replaceRoutableParameters($parameters = array())
	{
		$parameters = is_array($parameters) ? $parameters : array($parameters);

		foreach ($parameters as $key => $parameter)
		{
			if ($parameter instanceof UrlRoutable)
			{
				$parameters[$key] = $parameter->getRouteKey();
			}
		}

		return $parameters;
	}
690258
protected function buildDSNString(array &$parameters)
    {
        $dsn = [];
        foreach ($this->keys as $keyName) {
            if (\array_key_exists($keyName, $parameters) && \strlen($parameters[$keyName]) > 0) {
                $dsn[] = "{$keyName}={$parameters[$keyName]}";
            }
        }

        return \implode(";", $dsn);
    }
241973
protected function parameterValues($parameters)
    {
        $values = array();
        foreach ($parameters as $value) {
            $values[] = is_array($value) ? $value['value'] : $value;
        }
        return $values;
    }
1297136
protected function getDateTimeFormat($parameters) {
        $format          = 'Y-m-d H:i:s';
        $parametersCount = count($parameters);
        if ($parametersCount > $this->amountOfParameters) {
            $format = $parameters[$parametersCount - 1];
        }
        return $format;
    }
648941
protected function passGetScope(array $parameters): ?array
    {
        $scope = $this->passReadStringValue($parameters, 'scope');

        return empty($scope) === false ? explode(' ', $scope) : null;
    }
940336
private function createHeader($parameters)
	{
		$header = 'OAuth ';

		foreach ($parameters as $key => $value)
		{
			if (!strcmp($header, 'OAuth '))
			{
				$header .= $key . '="' . $this->safeEncode($value) . '"';
			}
			else
			{
				$header .= ', ' . $key . '="' . $value . '"';
			}
		}

		return $header;
	}
408381
public static function getCanonicalQueryString(array $parameters)
    {
        //没有参数，直接返回空串
        if (count($parameters) == 0) {
            return '';
        }

        $parameterStrings = array();
        foreach ($parameters as $k => $v) {
            //跳过Authorization字段
            if (strcasecmp('Authorization', $k) == 0) {
                continue;
            }
            if (!isset($k)) {
                throw new \InvalidArgumentException(
                    "parameter key should not be null"
                );
            }
            if (isset($v)) {
                //对于有值的，编码后放在=号两边
                $parameterStrings[] = AipHttpUtil::urlEncode($k)
                    . '=' . AipHttpUtil::urlEncode((string) $v);
            } else {
                //对于没有值的，只将key编码后放在=号的左边，右边留空
                $parameterStrings[] = AipHttpUtil::urlEncode($k) . '=';
            }
        }
        //按照字典序排序
        sort($parameterStrings);

        //使用'&'符号连接它们
        return implode('&', $parameterStrings);
    }
803030
public function analyticsSnippet(array $parameters): string
    {
        // Add extra dimensions (i.e. filtering categories)
        $tree = app(Tree::class);
        $user = app(UserInterface::class);

        $parameters['dimensions'] = (object) [
            'dimension1' => $tree instanceof Tree ? $tree->name() : '-',
            'dimension2' => $tree instanceof Tree ? Auth::accessLevel($tree, $user) : '-',
        ];

        return view('modules/google-analytics/snippet', $parameters);
    }
1101228
protected function prepareGet(array $parameters)
    {
        // Make a signable string
        $signable = http_build_query($parameters, null, '&');

        // Return the URL with the parameters
        return '?' . $signable . '&s=' . $this->makeSignature($signable);
    }
313274
public function parameters(array $parameters): HttpRequest
    {
        foreach ($parameters as $name => $value) {
            $this->parameter($name, $value);
        }

        return $this;
    }
386710
protected function getDocumentPath(array $parameters = []) {
        $dirOut = $this->getDirOutput();
        $dirOut = $dirOut.DIRECTORY_SEPARATOR.$this->getFileNameTranslate($parameters).'.'.$this->getFormat();
        return $dirOut;
    }
861460
private function buildQuery(array $parameters)
        {
            // no parameters?
            if(empty($parameters)) {
                return '';
            }

            // encode the keys
            $keys = self::urlencode_rfc3986(array_keys($parameters));

            // encode the values
            $values = self::urlencode_rfc3986(array_values($parameters));

            // reset the parameters
            $parameters = array_combine($keys, $values);

            // sort parameters by key
            uksort($parameters, 'strcmp');

            // loop parameters
            foreach ($parameters as $key => $value) {
                // sort by value
                if(Arrays::is($value)) $parameters[$key] = natsort($value);
            }

            // process parameters
            foreach ($parameters as $key => $value) {
                $chunks[] = $key . '=' . str_replace('%25', '%', $value);
            }

            // return
            return implode('&', $chunks);
        }