public function normalizeParameters(array $parameters)
    {
        $normalized = [];

        // [1] Encode both the keys and values.
        // Decode it frist, in case the given data is already encoded.
        foreach ($parameters as $key => $value) {
            $key = rawurlencode(rawurldecode($key));

            if (is_array($value)) {
                $normalized[$key] = $this->normalizeParameters($value);
            } else {
                $normalized[$key] = rawurlencode(rawurldecode($value));
            }
        }

        // [2] Sort by the encoded key.
        ksort($normalized);

        return $normalized;
    }
public function normalizeParameters(array $parameters)
    {
        $normalized = [];

        // [1] Encode both the keys and values.
        // Decode it frist, in case the given data is already encoded.
        foreach ($parameters as $key => $value) {
            $key = rawurlencode(rawurldecode($key));

            if (is_array($value)) {
                $normalized[$key] = $this->normalizeParameters($value);
            } else {
                $normalized[$key] = rawurlencode(rawurldecode($value));
            }
        }

        // [2] Sort by the encoded key.
        ksort($normalized);

        return $normalized;
    }
public function normalizeParameters ( array $ parameters ) { $ normalized = [ ] ; // [1] Encode both the keys and values. // Decode it frist, in case the given data is already encoded. foreach ( $ parameters as $ key => $ value ) { $ key = rawurlencode ( rawurldecode ( $ key ) ) ; if ( is_array ( $ value ) ) { $ normalized [ $ key ] = $ this -> normalizeParameters ( $ value ) ; } else { $ normalized [ $ key ] = rawurlencode ( rawurldecode ( $ value ) ) ; } } // [2] Sort by the encoded key. ksort ( $ normalized ) ; return $ normalized ; }
Normalize the given request parameters.

@param array $parameters

@return array
Normalize the given request parameters .