Beispiel #1
0
 static function getInstance()
 {
     if (self::$instance === false) {
         switch (self::getType()) {
             case 'mysql':
                 mysql_db::$host = self::$host;
                 mysql_db::$user = self::$user;
                 mysql_db::$pwd = self::$pwd;
                 mysql_db::$dbname = self::$dbname;
                 self::$instance = mysql_db::getInstance();
                 break;
             default:
                 die('No database of type ' . self::getType() . ' found');
         }
     }
     return self::$instance;
 }