You are here

function LingotekOAuthRequest::setParam in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::setParam()
  2. 7.5 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::setParam()
  3. 7.6 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::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 LingotekOAuthRequest::setParam()
LingotekOAuthRequester::doRequest in lib/oauth-php/library/LingotekOAuthRequester.php
* Perform the request, returns the response code, headers and body. * *
LingotekOAuthRequestSigner::sign in lib/oauth-php/library/LingotekOAuthRequestSigner.php
* Sign our message in the way the server understands. * Set the needed oauth_xxxx parameters. * *
LingotekOAuthRequestSigner::__construct in lib/oauth-php/library/LingotekOAuthRequestSigner.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/LingotekOAuthRequest.php, line 434

Class

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