You are here

function OAuthRequest::setParam in Lingotek Translation 7.3

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

* Set a parameter * *

Parameters

string name: * @param string value * @param boolean encoded set to true when the values are already encoded

3 calls to OAuthRequest::setParam()
OAuthRequester::doRequest in lib/oauth-php/library/OAuthRequester.php
* Perform the request, returns the response code, headers and body. * *
OAuthRequestSigner::sign in lib/oauth-php/library/OAuthRequestSigner.php
* Sign our message in the way the server understands. * Set the needed oauth_xxxx parameters. * *
OAuthRequestSigner::__construct in lib/oauth-php/library/OAuthRequestSigner.php
* Construct the request to be signed. Parses or appends the parameters in the params url. * When you supply an params array, then the params should not be urlencoded. * When you supply a string, then it is assumed it is of the type…

File

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

Class

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

Code

function setParam($name, $value, $encoded = false) {
  if (!$encoded) {
    $name_encoded = $this
      ->urlencode($name);
    if (is_array($value)) {
      foreach ($value as $v) {
        $this->param[$name_encoded][] = $this
          ->urlencode($v);
      }
    }
    else {
      $this->param[$name_encoded] = $this
        ->urlencode($value);
    }
  }
  else {
    $this->param[$name] = $value;
  }
}