Example #1
0
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         $class = __CLASS__;
         self::$instance = new $class();
         // Load configuration
         try {
             self::$instance->loadConfiguration();
         } catch (Exception $exception) {
             self::$instance = null;
             print_r($exception);
         }
     }
     return self::$instance;
 }