You are here

public function ParameterBag::has in JSON-RPC 2.x

Same name and namespace in other branches
  1. 8 src/Object/ParameterBag.php \Drupal\jsonrpc\Object\ParameterBag::has()

Checks if the bag has a parameter.

Parameters

string|int $key: The parameter key.

Return value

bool True if the param is present.

File

src/Object/ParameterBag.php, line 61

Class

ParameterBag
Value class to hold multiple parameters.

Namespace

Drupal\jsonrpc\Object

Code

public function has($key) {
  $this
    ->checkKeyIsValid($key);
  return isset($this->parameters[$key]);
}