Delegates calls to Tasks and resolves methods inside the class. Commands are looked
up with the following order:
- Method on the shell.
- Matching task name.
- main() method.
If a shell implements a main() method, all missing method calls will be sent to
main() with the original method name in the argv.
For tasks to be invoked they *must* be exposed as subcommands. If you define any subcommands,
you must define all the subcommands your shell needs, whether they be methods on this class
or methods on tasks.
public runCommand ( array $argv, boolean $autoMethod = false, array $extra = [] ) : integer | boolean | null | ||
$argv | array | Array of arguments to run the shell with. This array should be missing the shell name. |
$autoMethod | boolean | Set to true to allow any public method to be called even if it was not defined as a subcommand. This is used by ShellDispatcher to make building simple shells easy. |
$extra | array | Extra parameters that you can manually pass to the Shell to be dispatched. Built-in extra parameter is : - `requested` : if used, will prevent the Shell welcome message to be displayed |
return | integer | boolean | null |