Horde_Oauth_Request::_getSignableParameters PHP Method

_getSignableParameters() protected method

This will be all parameters except oauth_signature, sorted first by key, and if there are duplicate keys, then by value. The returned string will be all the key=value pairs concatenated by &.
protected _getSignableParameters ( ) : string
return string
    protected function _getSignableParameters()
    {
        // Grab all parameters
        $params = $this->_params;
        // Remove oauth_signature if present
        if (isset($params['oauth_signature'])) {
            unset($params['oauth_signature']);
        }
        // Urlencode both keys and values
        $keys = array_map(array('Horde_Oauth_Utils', 'urlencodeRfc3986'), array_keys($params));
        $values = array_map(array('Horde_Oauth_Utils', 'urlencodeRfc3986'), array_values($params));
        $params = array_combine($keys, $values);
        // Sort by keys (natsort)
        uksort($params, 'strnatcmp');
        // Generate key=value pairs
        $pairs = array();
        foreach ($params as $key => $value) {
            if (is_array($value)) {
                // If the value is an array, it's because there are multiple values
                // with the same key. Sort them, then add all the pairs.
                natsort($value);
                foreach ($value as $v2) {
                    $pairs[] = $key . '=' . $v2;
                }
            } else {
                $pairs[] = $key . '=' . $value;
            }
        }
        // Return the pairs, concatenated with &
        return implode('&', $pairs);
    }