public function ParameterBag::get in JSON-RPC 8
Same name and namespace in other branches
- 2.x src/Object/ParameterBag.php \Drupal\jsonrpc\Object\ParameterBag::get()
Gets the parameter value by its key.
Parameters
string|int $key: The parameter key.
Return value
mixed The parameter.
File
- src/
Object/ ParameterBag.php, line 47
Class
- ParameterBag
- Value class to hold multiple parameters.
Namespace
Drupal\jsonrpc\ObjectCode
public function get($key) {
$this
->ensure($key);
return isset($this->parameters[$key]) ? $this->parameters[$key] : NULL;
}