Class **Phalcon\\Cli\\Task** ============================ *extends* abstract class :doc:`Phalcon\\Di\\Injectable ` *implements* :doc:`Phalcon\\Events\\EventsAwareInterface `, :doc:`Phalcon\\Di\\InjectionAwareInterface `, :doc:`Phalcon\\Cli\\TaskInterface ` .. role:: raw-html(raw) :format: html :raw-html:`Source on GitHub` Every command-line task should extend this class that encapsulates all the task functionality A task can be used to run "tasks" such as migrations, cronjobs, unit-tests, or anything that you want. The Task class should at least have a "mainAction" method .. code-block:: php ` $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 **setEventsManager** (:doc:`Phalcon\\Events\\ManagerInterface ` $eventsManager) inherited from :doc:`Phalcon\\Di\\Injectable ` Sets the event manager public **getEventsManager** () inherited from :doc:`Phalcon\\Di\\Injectable ` Returns the internal event manager public **__get** (*mixed* $propertyName) inherited from :doc:`Phalcon\\Di\\Injectable ` Magic method __get