示例#1
0
 /**
  * TuiyoErrorHandler::getInstance()
  * 
  * @param bool $ifNotExist
  * @return
  */
 public function getInstance($ifNotExist = TRUE)
 {
     /** Creates new instance if none already exists ***/
     static $instance = array();
     if (isset($instance) && !empty($instance) && $ifNotExist) {
         if (is_object($instance)) {
             return $instance;
         } else {
             unset($instance);
             TuiyoErrorHandler::getInstance($ifNotExist);
         }
     } else {
         $instance = new TuiyoErrorHandler();
     }
     return $instance;
 }
示例#2
0
 /**
  * TuiyoInitiate::_loadErrorHandler()
  * 
  * @return
  */
 private function _loadErrorHandler()
 {
     TuiyoLoader::import('error.errorhandler');
     TuiyoErrorHandler::getInstance();
 }