You are here

protected function ParameterBag::ensure in JSON-RPC 8

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

Throw an exception if the bag does not have the parameter.

Throws

\InvalidArgumentException When the parameter is not present in the bag.

1 call to ParameterBag::ensure()
ParameterBag::get in src/Object/ParameterBag.php
Gets the parameter value by its key.

File

src/Object/ParameterBag.php, line 82

Class

ParameterBag
Value class to hold multiple parameters.

Namespace

Drupal\jsonrpc\Object

Code

protected function ensure($key) {
  $this
    ->checkKeyIsValid($key);
}