implements Phalcon\DI\InjectionAwareInterface, Phalcon\Events\EventsAwareInterface
This component allows to create CLI applications using Phalcon
Phalcon\CLI\Console constructor
Sets the DependencyInjector container
Returns the internal dependency injector
Sets the events manager
Returns the internal event manager
Register an array of modules present in the console
$application->registerModules(array( 'frontend' => array( 'className' => 'Multiple\Frontend\Module', 'path' => '../apps/frontend/Module.php' ), 'backend' => array( 'className' => 'Multiple\Backend\Module', 'path' => '../apps/backend/Module.php' ) ));
Merge modules with the existing ones
$application->addModules(array( 'admin' => array( 'className' => 'Multiple\Admin\Module', 'path' => '../apps/admin/Module.php' ) ));
Return the modules registered in the console
Handle the command-line arguments.
$arguments = array( 'task' => 'taskname', 'action' => 'action', 'params' => array('parameter1', 'parameter2') ); $console->handle($arguments);
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_CLI_Console.html