You are here

private function ArrayInput::addArgument in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Input/ArrayInput.php \Symfony\Component\Console\Input\ArrayInput::addArgument()

Adds an argument value.

Parameters

string $name The argument name:

mixed $value The value for the argument:

Throws

\InvalidArgumentException When argument given doesn't exist

1 call to ArrayInput::addArgument()
ArrayInput::parse in vendor/symfony/console/Input/ArrayInput.php
Processes command line arguments.

File

vendor/symfony/console/Input/ArrayInput.php, line 199

Class

ArrayInput
ArrayInput represents an input provided as an array.

Namespace

Symfony\Component\Console\Input

Code

private function addArgument($name, $value) {
  if (!$this->definition
    ->hasArgument($name)) {
    throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
  }
  $this->arguments[$name] = $value;
}