/** * Handle the error by triggering Splot\Framework\Events\ExceptionDidOccur event. */ public function handle() { $event = new ExceptionDidOccur($this->getException()); // trigger the event $this->eventManager->trigger($event); // only send the response in actual web mode $mode = $this->container->getParameter('mode'); if ($mode == Framework::MODE_WEB && $event->isHandled() && ($response = $event->getResponse())) { $response->send(); } if ($event->isDefaultPrevented()) { return Handler::QUIT; } if ($event->isPropagationStopped()) { return Handler::LAST_HANDLER; } return Handler::DONE; }
/** * Returns the module's config. * * @return Config */ public function getConfig() { return $this->container->get('config.' . $this->getName()); }
/** * Returns information whether or not application is ran in debug mode. * * @return boolean */ public function isDebug() { return $this->container->getParameter('debug'); }