Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
getFirstArgument () | |
hasParameterOption ($values, bool $onlyParams=false) | |
getParameterOption ($values, $default=false, bool $onlyParams=false) | |
bind (InputDefinition $definition) | |
validate () | |
getArguments () | |
getArgument (string $name) | |
setArgument (string $name, $value) | |
hasArgument (string $name) | |
getOptions () | |
getOption (string $name) | |
setOption (string $name, $value) | |
hasOption (string $name) | |
isInteractive () | |
setInteractive (bool $interactive) | |
InputInterface is the interface implemented by all input classes.
bind | ( | InputDefinition | $definition | ) |
Binds the current Input instance with the given arguments and options.
RuntimeException |
Implémenté dans CompletionInput, et Input.
Référencé par Application\doRun(), AbstractCommand\execute(), et Command\run().
getArgument | ( | string | $name | ) |
Returns the argument value for a given argument name.
InvalidArgumentException | When argument given doesn't exist |
Implémenté dans Input.
Référencé par HelpCommand\execute().
getArguments | ( | ) |
Returns all the given arguments merged with the default values.
Implémenté dans Input.
getFirstArgument | ( | ) |
Returns the first argument from the raw parameters (not parsed).
Implémenté dans ArgvInput, et ArrayInput.
getOption | ( | string | $name | ) |
Returns the option value for a given option name.
InvalidArgumentException | When option given doesn't exist |
Implémenté dans Input.
getOptions | ( | ) |
Returns all the given options merged with the default values.
Implémenté dans Input.
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) |
string | bool | int | float | array | null | $default | The default value to return if no result is found |
bool | $onlyParams | Only check real parameters, skip those following an end of options (–) signal |
Implémenté dans ArgvInput, et ArrayInput.
hasArgument | ( | string | $name | ) |
Returns true if an InputArgument object exists by name or position.
Implémenté dans Input.
hasOption | ( | string | $name | ) |
hasParameterOption | ( | $values, | |
bool | $onlyParams = false |
||
) |
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) |
bool | $onlyParams | Only check real parameters, skip those following an end of options (–) signal |
Implémenté dans ArgvInput, et ArrayInput.
isInteractive | ( | ) |
setArgument | ( | string | $name, |
$value | |||
) |
Sets an argument value by name.
mixed | $value | The argument value |
InvalidArgumentException | When argument given doesn't exist |
Implémenté dans Input.
setInteractive | ( | bool | $interactive | ) |
Sets the input interactivity.
Implémenté dans Input.
setOption | ( | string | $name, |
$value | |||
) |
Sets an option value by name.
mixed | $value | The option value |
InvalidArgumentException | When option given doesn't exist |
Implémenté dans Input.
validate | ( | ) |
Validates the input.
RuntimeException | When not enough arguments are given |
Implémenté dans Input.
Référencé par AbstractCommand\execute(), et Command\run().