How do add an event to run after running a console task? I'm basically trying to add a debug event after running the console task to print out queries, time taken, etc.
You can attach an events manager to cli/console:
<?php $em = new Phalcon\Events\Manager(); $em->attach("console:afterHandleTask", function($event, $console) { //Executed after handle the task }); $console = new Phalcon\CLI\Console(); $console->setEventsManager($em); $console->handle(...);
thanks, worked perfectly!