We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon cli task 子目录支持

所有的任务都放在task目录下,会比较臃肿,在不扩展 \Phalcon\Cli\TaskInterface 的情况下,能把任务放进子目录吗?需要怎么访问呢

Use english please.



43.9k

google translate tool from chinese to english:

"All the tasks are placed in the task directory, will be more bloated, do not expand \ Phalcon \ Cli \ TaskInterface circumstances, the task can be put into the subdirectory? Need to visit it"

well well, a bit unclear ...



751

https://docs.phalcon.io/zh/latest/reference/cli.html

Command Line Applications, the task can be put into the subdirectory ? How to visit subfolder task

├── migrations ├── Module.php └── tasks ├── a │ └── MainTask.php ├── b │ └── MainTask.php ├── MainTask.php ├── TestClientTask.php



751
├── migrations
├── Module.php
└── tasks
    ├── a
    │   └── MainTask.php
    ├── b
    │   └── MainTask.php
    ├── MainTask.php
    ├── TestClientTask.php

The sub directory can alias as a Namespace

eg :

  • Namespace\Tasks\A\ => tasks\a\
  • Namespace\Tasks\B\ => tasks\b\