You are here

public function ParameterMap::__construct in Drupal 7 to 8/9 Module Upgrader 8

File

src/Routing/ParameterMap.php, line 32

Class

ParameterMap
Represents a set of parameter bindings for a particular path, callback, and set of arguments.

Namespace

Drupal\drupalmoduleupgrader\Routing

Code

public function __construct(PathUtilityInterface $path, array $parameters, array $arguments = []) {
  parent::__construct();
  $this->path = $path;
  $this->_length = sizeof($path);
  while ($parameters) {
    $argument = $arguments ? array_shift($arguments) : ParameterBinding::NO_ARGUMENT;
    $this
      ->addBinding(new ParameterBinding($path, array_shift($parameters), $argument));
  }
}