Collection for Commands.
Used by Applications to whitelist their console commands. CakePHP will use the mapped commands to construct and dispatch shell commands.
__construct( array $commands  )
add( string $name , string|Cake\Console\Shell $command )
Add a command to the collection
addMany( array $commands )
Add multiple commands at once.
Automatically discover shell commands in CakePHP, the application and all plugins.
Commands will be located using filesystem conventions. Commands are discovered in the following order:
Commands from plugins will be added based on the order plugins are loaded. Plugin shells will attempt to use a short name. If however, a plugin provides a shell that conflicts with CakePHP or the application shells, the full
plugin_name.shell name will be used. Plugin shells are added in the order that plugins were loaded.
Implementation of Countable.
Get the number of commands in the collection.
get( string $name )
Get the target for a command.
Implementation of IteratorAggregate.
has( string $name )
Check whether the named shell exists in the collection.
remove( string $name )
Remove a command from the collection if it exists.
© 2005–2018 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.