getFirstArgument()
getFirstArgument() : string|null
Returns the first argument from the raw parameters (not parsed).
Returns
string|null —The value of the first argument or null otherwise
InputInterface is the interface implemented by all input classes.
hasParameterOption(string|array $values, boolean $onlyParams = false) : boolean
Returns true if the raw parameters (not parsed) contain a value.
This method is to be used to introspect the input parameters before they have been validated. It must be used carefully. Does not necessarily return the correct result for short options when multiple flags are combined in the same option.
string|array | $values | The values to look for in the raw parameters (can be an array) |
boolean | $onlyParams | Only check real parameters, skip those following an end of options (--) signal |
true if the value is contained in the raw parameters
getParameterOption(string|array $values, mixed $default = false, boolean $onlyParams = false) : mixed
Returns the value of a raw option (not parsed).
This method is to be used to introspect the input parameters before they have been validated. It must be used carefully. Does not necessarily return the correct result for short options when multiple flags are combined in the same option.
string|array | $values | The value(s) to look for in the raw parameters (can be an array) |
mixed | $default | The default value to return if no result is found |
boolean | $onlyParams | Only check real parameters, skip those following an end of options (--) signal |
The option value
bind(\Symfony\Component\Console\Input\InputDefinition $definition)
Binds the current Input instance with the given arguments and options.
\Symfony\Component\Console\Input\InputDefinition | $definition |
getArgument(string $name) : string|array<mixed,string>|null
Returns the argument value for a given argument name.
string | $name | The argument name |
When argument given doesn't exist
The argument value
setArgument(string $name, string|array<mixed,string>|null $value)
Sets an argument value by name.
string | $name | The argument name |
string|array<mixed,string>|null | $value | The argument value |
When argument given doesn't exist
getOption(string $name) : string|array<mixed,string>|boolean|null
Returns the option value for a given option name.
string | $name | The option name |
When option given doesn't exist
The option value
setOption(string $name, string|array<mixed,string>|boolean|null $value)
Sets an option value by name.
string | $name | The option name |
string|array<mixed,string>|boolean|null | $value | The option value |
When option given doesn't exist