/** * 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; }
/** * TuiyoInitiate::_loadErrorHandler() * * @return */ private function _loadErrorHandler() { TuiyoLoader::import('error.errorhandler'); TuiyoErrorHandler::getInstance(); }