コード例 #1
0
ファイル: class.db.php プロジェクト: hackdracko/kosmos
 public static function getInstance($servidor = 'localhost', $usuario = 'root', $clave = 'tecnicoweb', $bd = 'pface')
 {
     if (is_null(self::$_singleton)) {
         self::$_singleton = new DataBase($servidor, $usuario, $clave, $bd);
     }
     return self::$_singleton;
 }
コード例 #2
0
ファイル: orchid.db.php プロジェクト: glitchtank/GoUtec
 public static function getInstance()
 {
     // doesn't exists? create a new one
     if (is_null(self::$_singleton)) {
         self::$_singleton = new DataBase();
     }
     // return instance
     return self::$_singleton;
 }
コード例 #3
0
ファイル: mysqldiff.php プロジェクト: jhbsz/ossimTest
 public static function getInstance($db_name)
 {
     if (is_null(self::$_singleton)) {
         self::$_singleton = new DataBase($db_name);
     }
     return self::$_singleton;
 }