function LingotekOAuthRequestSigner::getQueryString in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.4 lib/oauth-php/library/LingotekOAuthRequestSigner.php \LingotekOAuthRequestSigner::getQueryString()
- 7.5 lib/oauth-php/library/LingotekOAuthRequestSigner.php \LingotekOAuthRequestSigner::getQueryString()
- 7.6 lib/oauth-php/library/LingotekOAuthRequestSigner.php \LingotekOAuthRequestSigner::getQueryString()
* Builds the application/x-www-form-urlencoded parameter string. Can be appended as * the query part to a GET or inside the request body for a POST. * *
Parameters
boolean oauth_as_header (optional) set to false to include oauth parameters: * @return string
1 call to LingotekOAuthRequestSigner::getQueryString()
- LingotekOAuthRequester::curl_raw in lib/
oauth-php/ library/ LingotekOAuthRequester.php - * Open and close a curl session passing all the options to the curl libs * *
File
- lib/
oauth-php/ library/ LingotekOAuthRequestSigner.php, line 186
Class
Code
function getQueryString($oauth_as_header = true) {
$parms = array();
foreach ($this->param as $name => $value) {
if (!$oauth_as_header || strncmp($name, 'oauth_', 6) != 0 && strncmp($name, 'xoauth_', 7) != 0) {
if (is_array($value)) {
foreach ($value as $v) {
$parms[] = $name . '=' . $v;
}
}
else {
$parms[] = $name . '=' . $value;
}
}
}
return implode('&', $parms);
}