A InputDefinition represents a set of valid command line arguments and options.
Usage:
$definition = new InputDefinition([ new InputArgument('name', InputArgument::REQUIRED), new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), ]);
| Methods | ||
|---|---|---|
| 
					
	public
					
					
				 | __construct(array $definition = []) | # | 
| 
					
	public
					
					
				 | setDefinition(array $definition) | # | 
| 
					
	public
					
					
				 | setArguments(InputArgument[] $arguments = []) | # | 
| 
					
	public
					
					
				 | addArguments(InputArgument[] $arguments = []) | # | 
| 
					
	public
					
					
				 | addArgument(InputArgument $argument) | # | 
| 
					
	public
					
					
				 | getArgument(string|int $name): InputArgument | # | 
| 
					
	public
					
					
				 | hasArgument(string|int $name): bool | # | 
| 
					
	public
					
					
				 | getArguments(): InputArgument[] | # | 
| 
					
	public
					
					
				 | getArgumentCount(): int | # | 
| 
					
	public
					
					
				 | getArgumentRequiredCount(): int | # | 
| 
					
	public
					
					
				 | getArgumentDefaults(): array<string|bool|int|float|array|null> | # | 
| 
					
	public
					
					
				 | setOptions(InputOption[] $options = []) | # | 
| 
					
	public
					
					
				 | addOptions(InputOption[] $options = []) | # | 
| 
					
	public
					
					
				 | addOption(InputOption $option) | # | 
| 
					
	public
					
					
				 | getOption(string $name): InputOption | # | 
| 
					
	public
					
					
				 | hasOption(string $name): bool | # | 
| 
					
	public
					
					
				 | getOptions(): InputOption[] | # | 
| 
					
	public
					
					
				 | hasShortcut(string $name): bool | # | 
| 
					
	public
					
					
				 | hasNegation(string $name): bool | # | 
| 
					
	public
					
					
				 | getOptionForShortcut(string $shortcut): InputOption | # | 
| 
					
	public
					
					
				 | getOptionDefaults(): array<string|bool|int|float|array|null> | # | 
| 
					
	public
					
					
				 | getSynopsis(bool $short = false): string | # |