Example #1
0
 public static function connect()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #2
0
 public static function connect()
 {
     if (!self::$instance) {
         self::$instance = new self("mysql:host=localhost;dbname=test", 'root', 'root');
     }
     return self::$instance;
 }