ArrayInput represents an input provided as an array.
Usage:
$input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);
- author Fabien Potencier
CloneableInstantiable
Methods |
public __construct(array $parameters, ?Symfony |
public __toString() : string Returns a stringified representation of the args passed to the command. |
public getFirstArgument() : ?string |
public getParameterOption(array|string $values, array|string|int|float|bool|?null $default = false, bool $onlyParams = false) : ?mixed |
public hasParameterOption(array|string $values, bool $onlyParams = false) : bool |
Properties |
Methods |
protected parse() : void |
Properties |
private array $parameters |
Methods |
private addArgument(string|int $name, ?mixed $value) : void Adds an argument value.
|
private addLongOption(string $name, ?mixed $value) : void Adds a long option value.
|
private addShortOption(string $shortcut, ?mixed $value) : void Adds a short option value.
|