lazzy_ms
lazzy_ms

Reputation: 1374

Call Phalcon TaskAction from Controller

Is that possible to call a taskAction (which is in cli Task) from any Controller in Phalcon?

I have a app->task->mainTask.php and app->controller->apiController.php I want to call a function which is in mainTask.php from apiController.php, Can I do that? if yes, How?

Thanks.

Upvotes: 0

Views: 352

Answers (1)

Juri
Juri

Reputation: 1369

Isn't it easier to just move this code from task to service and use this service in both controller and task?

Upvotes: 1

Related Questions