Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ArrayInput.php

function ArrayInput::addArgument

Adds an argument value.

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 183

Class

ArrayInput
ArrayInput represents an input provided as an array.

Namespace

Symfony\Component\Console\Input

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal