You are here

public function ParameterBag::__construct in JSON-RPC 8

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

ParameterBag constructor.

Parameters

array $parameters: The parameters.

bool $positional: True if the parameters are positional.

File

src/Object/ParameterBag.php, line 33

Class

ParameterBag
Value class to hold multiple parameters.

Namespace

Drupal\jsonrpc\Object

Code

public function __construct(array $parameters, $positional = FALSE) {
  $this->positional = $positional;
  $this->parameters = $positional ? array_values($parameters) : $parameters;
}