Hi,
I want to call a controller action in a cli task (to not write the same code again):
namespace app\tasks {
use Phalcon\CLI\Task;
class MailTask extends Task {
public function welcomeAction()
{
...
$this->dispatcher->forward([
'namespace' => 'app\controllers',
'controller' => 'mail',
'action' => 'sendWelcome',
'params' => [...]
]);
But the dispatcher tries to call a task
$ php cli/app.php mail welcome
$ app\controllers\MailTask handler class cannot be loaded
:( How to do it?