Run CLI commands for the provided application.
$aliases
protected array
$app
protected $root
protected string
cake
. __construct( Cake\Core\ConsoleApplicationInterface $app , string $root 'cake' )
Constructor
Cake\Core\ConsoleApplicationInterface
$app
$root
optional 'cake' createShell( string $className , Cake\Console\ConsoleIo $io )
The wrapper for creating shell instances.
$className
Cake\Console\ConsoleIo
$io
Cake\Console\Shell
getShell( Cake\Console\ConsoleIo $io , Cake\Console\CommandCollection $commands , string $name )
Get the shell instance for a given command name
Cake\Console\ConsoleIo
$io
Cake\Console\CommandCollection
$commands
$name
Cake\Console\Shell
run( array $argv , Cake\Console\ConsoleIo $io null )
Run the command contained in $argv.
Use the application to do the following:
Console.buildCommands
event of auto-wiring plugins.$argv
Cake\Console\ConsoleIo
$io
optional null setAliases( array $aliases )
Replace the entire alias map for a runner.
Aliases allow you to define alternate names for commands in the collection. This can be useful to add top level switches like --version
or -h
$runner->setAliases(['--version' => 'version']);
$aliases
protected Cake\Core\ConsoleApplicationInterface
The application console commands are being run for.
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Console.CommandRunner.html