protected function beforeAction($action, $params) { if ($this->debug) { ALogger::$debug = true; } return true; }