You are here

function LingotekOAuthRequest::urlencode in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.4 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::urlencode()
  2. 7.5 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::urlencode()
  3. 7.6 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::urlencode()

* Encode a string according to the RFC3986 * *

Parameters

string s: * @return string

5 calls to LingotekOAuthRequest::urlencode()
LingotekOAuthRequest::getRequestBodyOfMultipart in lib/oauth-php/library/LingotekOAuthRequest.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. * *
LingotekOAuthRequest::setParam in lib/oauth-php/library/LingotekOAuthRequest.php
* Set a parameter * *
LingotekOAuthRequest::urltranscode in lib/oauth-php/library/LingotekOAuthRequest.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. * *
LingotekOAuthServer::accessToken in lib/oauth-php/library/LingotekOAuthServer.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.
LingotekOAuthServer::requestToken in lib/oauth-php/library/LingotekOAuthServer.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/LingotekOAuthRequest.php, line 527

Class

LingotekOAuthRequest
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));
  }
}