TYPO3
7.6
|
Public Member Functions | |
__construct (array $parameters, InputDefinition $definition=null) | |
getFirstArgument () | |
hasParameterOption ($values) | |
getParameterOption ($values, $default=false) | |
__toString () | |
Public Member Functions inherited from Input | |
__construct (InputDefinition $definition=null) | |
bind (InputDefinition $definition) | |
validate () | |
isInteractive () | |
setInteractive ($interactive) | |
getArguments () | |
getArgument ($name) | |
setArgument ($name, $value) | |
hasArgument ($name) | |
getOptions () | |
getOption ($name) | |
setOption ($name, $value) | |
hasOption ($name) | |
escapeToken ($token) | |
Protected Member Functions | |
parse () | |
Protected Member Functions inherited from Input | |
parse () | |
Private Member Functions | |
addShortOption ($shortcut, $value) | |
addLongOption ($name, $value) | |
addArgument ($name, $value) | |
Private Attributes | |
$parameters | |
Additional Inherited Members | |
Protected Attributes inherited from Input | |
$definition | |
$options = array() | |
$arguments = array() | |
$interactive = true | |
ArrayInput represents an input provided as an array.
Usage:
$input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar'));
Definition at line 25 of file ArrayInput.php.
__construct | ( | array | $parameters, |
InputDefinition | $definition = null |
||
) |
Constructor.
array | $parameters | An array of parameters |
InputDefinition | $definition | A InputDefinition instance |
Definition at line 37 of file ArrayInput.php.
References Input\$definition, and ArrayInput\$parameters.
__toString | ( | ) |
Returns a stringified representation of the args passed to the command.
Definition at line 120 of file ArrayInput.php.
References Input\escapeToken().
|
private |
Adds an argument value.
string | $name | The argument name |
mixed | $value | The value for the argument |
\InvalidArgumentException | When argument given doesn't exist |
Definition at line 203 of file ArrayInput.php.
Referenced by ArrayInput\parse().
|
private |
Adds a long option value.
string | $name | The long option key |
mixed | $value | The value for the option |
\InvalidArgumentException | When option given doesn't exist |
\InvalidArgumentException | When a required value is missing |
Definition at line 176 of file ArrayInput.php.
Referenced by ArrayInput\addShortOption(), and ArrayInput\parse().
|
private |
Adds a short option value.
string | $shortcut | The short option key |
mixed | $value | The value for the option |
\InvalidArgumentException | When option given doesn't exist |
Definition at line 158 of file ArrayInput.php.
References ArrayInput\addLongOption().
Referenced by ArrayInput\parse().
getFirstArgument | ( | ) |
Returns the first argument from the raw parameters (not parsed).
Implements InputInterface.
Definition at line 49 of file ArrayInput.php.
getParameterOption | ( | $values, | |
$default = false |
|||
) |
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.
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 |
Implements InputInterface.
Definition at line 98 of file ArrayInput.php.
References elseif.
hasParameterOption | ( | $values | ) |
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.
string | array | $values | The values to look for in the raw parameters (can be an array) |
Implements InputInterface.
Definition at line 70 of file ArrayInput.php.
|
protected |
Processes command line arguments.
Definition at line 137 of file ArrayInput.php.
References ArrayInput\addArgument(), ArrayInput\addLongOption(), ArrayInput\addShortOption(), and elseif.
|
private |
Definition at line 27 of file ArrayInput.php.
Referenced by ArrayInput\__construct().