TYPO3
7.6
|
Public Member Functions | |
getFirstArgument () | |
hasParameterOption ($values) | |
getParameterOption ($values, $default=false) | |
bind (InputDefinition $definition) | |
validate () | |
getArguments () | |
getArgument ($name) | |
setArgument ($name, $value) | |
hasArgument ($name) | |
getOptions () | |
getOption ($name) | |
setOption ($name, $value) | |
hasOption ($name) | |
isInteractive () | |
setInteractive ($interactive) | |
InputInterface is the interface implemented by all input classes.
Definition at line 19 of file InputInterface.php.
bind | ( | InputDefinition | $definition | ) |
Binds the current Input instance with the given arguments and options.
InputDefinition | $definition | A InputDefinition instance |
Implemented in Input.
Referenced by Command\run().
getArgument | ( | $name | ) |
Gets argument by name.
string | $name | The name of the argument |
Implemented in Input.
Referenced by HelpCommand\execute().
getArguments | ( | ) |
getFirstArgument | ( | ) |
Returns the first argument from the raw parameters (not parsed).
Implemented in ArgvInput, and ArrayInput.
Referenced by Application\getCommandName(), and CliRequestHandler\validateCommandLineKeyFromInput().
getOption | ( | $name | ) |
Gets an option by name.
string | $name | The name of the option |
Implemented in Input.
Referenced by HelpCommand\execute().
getOptions | ( | ) |
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 |
Implemented in ArgvInput, and ArrayInput.
Referenced by Application\configureIO().
hasArgument | ( | $name | ) |
Returns true if an InputArgument object exists by name or position.
string | int | $name | The InputArgument name or position |
Implemented in Input.
hasOption | ( | $name | ) |
Returns true if an InputOption object exists by name.
string | $name | The InputOption name |
Implemented in Input.
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) |
Implemented in ArgvInput, and ArrayInput.
Referenced by Application\configureIO(), and Application\doRun().
isInteractive | ( | ) |
Is this input means interactive?
Implemented in Input.
Referenced by QuestionHelper\ask(), and Command\run().
setArgument | ( | $name, | |
$value | |||
) |
Sets an argument value by name.
string | $name | The argument name |
string | $value | The argument value |
\InvalidArgumentException | When argument given doesn't exist |
Implemented in Input.
setInteractive | ( | $interactive | ) |
Sets the input interactivity.
bool | $interactive | If the input should be interactive |
Implemented in Input.
Referenced by Application\configureIO().
setOption | ( | $name, | |
$value | |||
) |
Sets an option value by name.
string | $name | The option name |
string | bool | $value | The option value |
\InvalidArgumentException | When option given doesn't exist |
Implemented in Input.
Referenced by HelpCommand\execute().
validate | ( | ) |
Validates if arguments given are correct.
Throws an exception when not enough arguments are given.
\RuntimeException |
Implemented in Input.
Referenced by Command\run().