/** * Initializes the route. * This method is invoked after the route is created by the route manager. */ public function init() { // required for correct PhpConsoleExtension work YiiBase::app()->getErrorHandler()->discardOutput = false; YiiBase::getLogger()->autoFlush = 1; // init PHP Console require_once dirname(__FILE__) . '/PhpConsole/PhpConsole.php'; PhpConsole::$callOldErrorHandler = false; PhpConsole::$callOldExceptionsHandler = false; PhpConsole::start($this->handleErrors, $this->handleExceptions, $this->basePathToStrip); }