Class **Phalcon\\Cli\\Console** =============================== *extends* abstract class :doc:`Phalcon\\Application ` *implements* :doc:`Phalcon\\Di\\InjectionAwareInterface `, :doc:`Phalcon\\Events\\EventsAwareInterface ` .. role:: raw-html(raw) :format: html :raw-html:`Source on GitHub` This component allows to create CLI applications using Phalcon Methods ------- public **addModules** (*array* $modules) Merge modules with the existing ones .. code-block:: php addModules(array( 'admin' => array( 'className' => 'Multiple\Admin\Module', 'path' => '../apps/admin/Module.php' ) )); public **handle** ([*array* $arguments]) Handle the whole command-line tasks public **setArgument** ([*array* $arguments], [*mixed* $str], [*mixed* $shift]) Set an specific argument public **__construct** ([:doc:`Phalcon\\DiInterface ` $dependencyInjector]) inherited from :doc:`Phalcon\\Application ` Phalcon\\Application public **setEventsManager** (:doc:`Phalcon\\Events\\ManagerInterface ` $eventsManager) inherited from :doc:`Phalcon\\Application ` Sets the events manager public **getEventsManager** () inherited from :doc:`Phalcon\\Application ` Returns the internal event manager public **registerModules** (*array* $modules, [*mixed* $merge]) inherited from :doc:`Phalcon\\Application ` Register an array of modules present in the application .. code-block:: php registerModules( [ 'frontend' => [ 'className' => 'Multiple\Frontend\Module', 'path' => '../apps/frontend/Module.php' ], 'backend' => [ 'className' => 'Multiple\Backend\Module', 'path' => '../apps/backend/Module.php' ] ] ); public **getModules** () inherited from :doc:`Phalcon\\Application ` Return the modules registered in the application public **getModule** (*mixed* $name) inherited from :doc:`Phalcon\\Application ` Gets the module definition registered in the application via module name public **setDefaultModule** (*mixed* $defaultModule) inherited from :doc:`Phalcon\\Application ` Sets the module name to be used if the router doesn't return a valid module public **getDefaultModule** () inherited from :doc:`Phalcon\\Application ` Returns the default module name public **setDI** (:doc:`Phalcon\\DiInterface ` $dependencyInjector) inherited from :doc:`Phalcon\\Di\\Injectable ` Sets the dependency injector public **getDI** () inherited from :doc:`Phalcon\\Di\\Injectable ` Returns the internal dependency injector public **__get** (*mixed* $propertyName) inherited from :doc:`Phalcon\\Di\\Injectable ` Magic method __get