ArrayInput represents an input provided as an array.


$input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);

public __construct(array $parameters, ?Symfony\Component\Console\Input\InputDefinition $definition = NULL)
public __toString() : string

Returns a stringified representation of the args passed to the command.

public Symfony\Component\Console\Input\Input::bind(Symfony\Component\Console\Input\InputDefinition $definition)
  • return void
public Symfony\Component\Console\Input\Input::escapeToken(string $token) : string

Escapes a token through escapeshellarg if it contains unsafe chars.

public Symfony\Component\Console\Input\Input::getArgument(string $name) : ?mixed
public Symfony\Component\Console\Input\Input::getArguments() : array
public getFirstArgument() : ?string
public Symfony\Component\Console\Input\Input::getOption(string $name) : ?mixed
public Symfony\Component\Console\Input\Input::getOptions() : array
public getParameterOption(array|string $values, array|string|int|float|bool|?null $default = false, bool $onlyParams = false) : ?mixed
public Symfony\Component\Console\Input\Input::getStream()
  • return resource
public Symfony\Component\Console\Input\Input::hasArgument(string $name) : bool
public Symfony\Component\Console\Input\Input::hasOption(string $name) : bool
public hasParameterOption(array|string $values, bool $onlyParams = false) : bool
public Symfony\Component\Console\Input\Input::isInteractive() : bool
public Symfony\Component\Console\Input\Input::setArgument(string $name, ?mixed $value)
  • return void
public Symfony\Component\Console\Input\Input::setInteractive(bool $interactive)
  • return void
public Symfony\Component\Console\Input\Input::setOption(string $name, ?mixed $value)
  • return void
public Symfony\Component\Console\Input\Input::setStream( $stream)
  • param resource $stream
  • return void
public Symfony\Component\Console\Input\Input::validate()
  • return void
protected Symfony\Component\Console\Input\Input::$arguments = []
protected Symfony\Component\Console\Input\Input::$definition = NULL
protected Symfony\Component\Console\Input\Input::$interactive = true
protected Symfony\Component\Console\Input\Input::$options = []
protected Symfony\Component\Console\Input\Input::$stream = NULL
protected parse()
  • return void
private array $parameters
private addArgument(string|int $name, ?mixed $value) : void

Adds an argument value.

  • throws \InvalidArgumentException When argument given doesn't exist
private addLongOption(string $name, ?mixed $value) : void

Adds a long option value.

  • throws \InvalidOptionException When option given doesn't exist
  • throws \InvalidOptionException When a required value is missing
private addShortOption(string $shortcut, ?mixed $value) : void

Adds a short option value.

  • throws \InvalidOptionException When option given doesn't exist
© 2023 Bruce Wells
Search Namespaces \ Classes