Example #1
0
 private function __construct()
 {
     try {
         // initialize the event manager and notification classes
         $this->eventManager = EventManager::getInstance();
         $this->notification = ClaroNotification::getInstance();
         $this->notifier = ClaroNotifier::getInstance();
         // initialize logger
         $this->logger = new Logger();
         $this->moduleLabelStack = array();
         if (isset($GLOBALS['tlabelReq'])) {
             $this->pushModuleLabel($GLOBALS['tlabelReq']);
             pushClaroMessage("Set current module to {$GLOBALS['tlabelReq']}", 'debug');
         }
     } catch (Exception $e) {
         die($e);
     }
 }
Example #2
0
 public static function getInstance()
 {
     if (!ClaroNotification::$instance) {
         ClaroNotification::$instance = new ClaroNotification();
     }
     return ClaroNotification::$instance;
 }