/** * * @return \Thelia\Log\Tlog */ public static function getInstance() { if (self::$instance == false) { self::$instance = new Tlog(); // On doit placer les initialisations à ce level pour pouvoir // utiliser la classe Tlog dans les classes de base (Cnx, BaseObj, etc.) // Les placer dans le constructeur provoquerait une boucle self::$instance->init(); } return self::$instance; }
/** * Create a new Tlog instance, that could be configured without interfering with the "main" instance * * @return Tlog a new Tlog instance. */ public static function getNewInstance() { $instance = new Tlog(); $instance->init(); return $instance; }