Пример #1
0
 /**
  * Handle uncaught exceptions
  *
  * @param Exception $exception Uncaught exception
  * @return void
  */
 public function handleException(Exception $exception)
 {
     try {
         foreach ($this->writers as $writer) {
             $this->em->registerListener('onUncaughtException', new $writer());
         }
         $this->em->dispatch(new iMSCP_Exception_Event($exception));
     } catch (Exception $e) {
         die(sprintf('Unable to handle uncaught exception thrown in file %s at line %s with message: %s', $e->getFile(), $e->getLine(), $e->getMessage()));
     }
 }
Пример #2
0
 /**
  * Register callback to load navigation file
  *
  * @return void
  */
 protected function initializeNavigation()
 {
     $this->eventManager->registerListener(array(iMSCP_Events::onAdminScriptStart, iMSCP_Events::onResellerScriptStart, iMSCP_Events::onClientScriptStart), 'layout_loadNavigation');
 }