public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new ErrorHandler(); } return self::$instance; }
/** * Returns an instance of Session object * @return Session */ public static function getInstance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; }
/** * Singleton method * */ public static function singleton() { if (!isset(self::$instance)) { $c = __CLASS__; self::$instance = new $c(); } return self::$instance; }
public static function getInstance() { if (!self::$instance) { $c = __CLASS__; self::$instance = new $c(); } return self::$instance; }
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')); } }