Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to work with more than one namespace with Phalcon Cli?

Hello,

I would like to work with the Phalcon Cli tasks using a variety of namespaces to facilitate the understanding and organization of tasks.

Is there any way to do this in Phalcon Cli?

For example:

  • directories
app
|_ tasks
    |_ db
       |_ DumpDbTask.php
       |_ ImportDbTask.php
    |_ file
       |_ GenerateFileTask.php
       |_ ErraseFilesTask.php
    DbTask.php
    FileTask.php
    MainTask.php
  • namespaces:
"App\\Task"       => APP_PATH . "/app/tasks",
"App\\Task\\Db"   => APP_PATH . "/app/tasks/db",
"App\\Task\\File" => APP_PATH . "/app/tasks/file",

Thanks Wojciech! Works properly!