PreflightArgsInterface
interface PreflightArgsInterface (View source)
Storage for arguments preprocessed during preflight.
Methods
Return an associative array of '--option' => 'methodName'.
Copy any applicable arguments into the provided configuration object, as appropriate.
Return all of the args from the inputs that were NOT processed by the ArgsPreprocessor (anything not listed in optionsWithValues).
Return the path to this application's executable ($argv[0]).
Return the command name from the runtime args. Note that the command name also exists inside the runtime args, because the runtime args maintain the order of the options relative to the command name (save for those options removed by preflight args).
Store the command name, once it is found.
Add one argument to the end of the list returned by the args()
method.
Add everything in the provided array to the list returned by args()
Return any '@alias' that may have appeared before the argument holding the command name.
Returns 'true' if an '@alias' was set.
Set an alias. Should always begin with '@'.
Details
array
optionsWithValues()
Return an associative array of '--option' => 'methodName'.
The 'option' string should begin with the appropriate number of dashes (one or two, as desired), and should end with a '=' if the option requires a value.
applyToConfig(ConfigInterface $config)
Copy any applicable arguments into the provided configuration object, as appropriate.
args()
Return all of the args from the inputs that were NOT processed by the ArgsPreprocessor (anything not listed in optionsWithValues).
applicationPath()
Return the path to this application's executable ($argv[0]).
commandName()
Return the command name from the runtime args. Note that the command name also exists inside the runtime args, because the runtime args maintain the order of the options relative to the command name (save for those options removed by preflight args).
setCommandName($commandName)
Store the command name, once it is found.
addArg(string $arg)
Add one argument to the end of the list returned by the args()
method.
passArgs($args)
Add everything in the provided array to the list returned by args()
alias()
Return any '@alias' that may have appeared before the argument holding the command name.
hasAlias()
Returns 'true' if an '@alias' was set.
setAlias(string $alias)
Set an alias. Should always begin with '@'.