You are here

protected function OAuthRequest::transcodeParams in Lingotek Translation 7.2

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

* Re-encode all parameters so that they are encoded using RFC3986. * Updates the $this->param attribute.

1 call to OAuthRequest::transcodeParams()
OAuthRequest::__construct in lib/oauth-php/library/OAuthRequest.php
* Construct from the current request. Useful for checking the signature of a request. * When not supplied with any parameters this will use the current request. * *

File

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

Class

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

Code

protected function transcodeParams() {
  $params = $this->param;
  $this->param = array();
  foreach ($params as $name => $value) {
    if (is_array($value)) {
      $this->param[$this
        ->urltranscode($name)] = array_map(array(
        $this,
        'urltranscode',
      ), $value);
    }
    else {
      $this->param[$this
        ->urltranscode($name)] = $this
        ->urltranscode($value);
    }
  }
}