/** * Short description of method singleton * * @access public * @author Sam, <*****@*****.**> * @return common_log_Dispatcher */ public static function singleton() { $returnValue = null; if (is_null(self::$instance)) { self::$instance = new common_profiler_Dispatcher(); } $returnValue = self::$instance; return $returnValue; }
/** * Constructor * * @author Somsack Sipasseuth ,<*****@*****.**> * @access private */ private function __construct() { $this->startTime = self::getCurrentTime(); $this->implementor = common_profiler_Dispatcher::singleton(); $this->enabled = (bool) $this->implementor->hasAppender(); }