You are here

public static function OAuthUtil::urlencode_rfc3986 in OAuth 1.0 6.3

Same name and namespace in other branches
  1. 7.3 lib/OAuth.php \OAuthUtil::urlencode_rfc3986()
7 calls to OAuthUtil::urlencode_rfc3986()
OAuthRequest::get_signature_base_string in lib/OAuth.php
Returns the base string of this request
OAuthRequest::to_header in lib/OAuth.php
builds the Authorization: header
OAuthSignatureMethod_HMAC::build_signature in includes/OAuthSignatureMethod_HMAC.inc
Build up the signature NOTE: The output of this function MUST NOT be urlencoded. the encoding is handled in OAuthRequest when the final request is serialized
OAuthSignatureMethod_HMAC_SHA1::build_signature in lib/OAuth.php
Build up the signature NOTE: The output of this function MUST NOT be urlencoded. the encoding is handled in OAuthRequest when the final request is serialized
OAuthSignatureMethod_PLAINTEXT::build_signature in lib/OAuth.php
oauth_signature is set to the concatenated encoded values of the Consumer Secret and Token Secret, separated by a '&' character (ASCII code 38), even if either secret is empty. The result MUST be encoded again.

... See full list

File

lib/OAuth.php, line 761
OAuth 1.0 server and client library.

Class

OAuthUtil

Code

public static function urlencode_rfc3986($input) {
  if (is_array($input)) {
    return array_map(array(
      'OAuthUtil',
      'urlencode_rfc3986',
    ), $input);
  }
  else {
    if (is_scalar($input)) {
      return str_replace('+', ' ', str_replace('%7E', '~', rawurlencode($input)));
    }
    else {
      return '';
    }
  }
}