public function sOAuthRequest::set_parameter in jQuery social stream 7
Same name and namespace in other branches
- 7.2 jquery_social_stream.js.inc \sOAuthRequest::set_parameter()
1 call to sOAuthRequest::set_parameter()
File
- ./
jquery_social_stream.js.inc, line 634 - JS callbacks.
Class
Code
public function set_parameter($name, $value, $allow_duplicates = true) {
if ($allow_duplicates && isset($this->parameters[$name])) {
// We have already added parameter(s) with this name, so add to the list
if (is_scalar($this->parameters[$name])) {
// This is the first duplicate, so transform scalar (string)
// into an array so we can add the duplicates
$this->parameters[$name] = array(
$this->parameters[$name],
);
}
$this->parameters[$name][] = $value;
}
else {
$this->parameters[$name] = $value;
}
}