You are here

function OAuthRequest::urlencode in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.2 lib/oauth-php/library/OAuthRequest.php \OAuthRequest::urlencode()

* Encode a string according to the RFC3986 * *

Parameters

string s: * @return string

5 calls to OAuthRequest::urlencode()
OAuthRequest::getRequestBodyOfMultipart in lib/oauth-php/library/OAuthRequest.php
* Get the body of a POST with multipart/form-data by Edison tsai on 16:52 2010/09/16 * * Used for fetching the post parameters and to calculate the body signature. * *
OAuthRequest::setParam in lib/oauth-php/library/OAuthRequest.php
* Set a parameter * *
OAuthRequest::urltranscode in lib/oauth-php/library/OAuthRequest.php
* urltranscode - make sure that a value is encoded using RFC3986. * We use a basic urldecode() function so that any use of '+' as the * encoding of the space character is correctly handled. * *
OAuthServer::accessToken in lib/oauth-php/library/OAuthServer.php
* Exchange a request token for an access token. * The exchange is only succesful iff the request token has been authorized. * * Never returns, calls exit() when token is exchanged or when error is returned.
OAuthServer::requestToken in lib/oauth-php/library/OAuthServer.php
* Handle the request_token request. * Returns the new request token and request token secret. * * TODO: add correct result code to exception * *

File

lib/oauth-php/library/OAuthRequest.php, line 611

Class

OAuthRequest
Object to parse an incoming OAuth request or prepare an outgoing OAuth request

Code

function urlencode($s) {
  if ($s === false) {
    return $s;
  }
  else {
    return str_replace('%7E', '~', rawurlencode($s));
  }
}