Exemplo n.º 1
0
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new ErrorHandler();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
 /**
  * Returns an instance of Session object
  * @return Session
  */
 public static function getInstance()
 {
     if (self::$instance === null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemplo n.º 3
0
 /**
  * Singleton method
  *  
  */
 public static function singleton()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
Exemplo n.º 4
0
 public static function getInstance()
 {
     if (!self::$instance) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
Exemplo n.º 5
0
 public static function setAsHandler($error_level = E_ALL)
 {
     if (!self::$instance instanceof ErrorHandler) {
         self::$instance = new ErrorHandler();
         set_error_handler(array('ErrorHandler', 'error'), $error_level);
         set_exception_handler(array('ErrorHandler', 'exception'));
     }
 }