Ejemplo n.º 1
0
 /**
  * @desc get mysql instance by using singleton pattern
  */
 public static function getInstance()
 {
     if (!isset(self::$_instance) || self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 2
0
 public static function getInstance()
 {
     if (FALSE == self::$_instance instanceof self) {
         self::$_instance = new self(self::$config);
     }
     return self::$_instance;
 }