/** * Returns the normalized parameters of the request * * This will be all (except oauth_signature) parameters, * sorted first by key, and if duplicate keys, then by * value. * * The returned string will be all the key=value pairs * concated by &. * * @return string */ function get_signable_parameters() { // Include query parameters $query_str = parse_url($this->http_url, PHP_URL_QUERY); if ($query_str) { $parsed_query = OAuthUtil::oauth_parse_string($query_str); parse_str($query_str, $php_parsed_query); if (OAuthUtil::oauth_http_build_query($parsed_query) != OAuthUtil::oauth_http_build_query($php_parsed_query)) { $parsed_query = $php_parsed_query; } foreach ($parsed_query as $key => $value) { $this->set_parameter($key, $value); } } // Grab all parameters $params = $this->parameters; // Remove oauth_signature if present if (isset($params['oauth_signature'])) { unset($params['oauth_signature']); } return OAuthUtil::oauth_http_build_query($params); }