Exemple #1
0
 public static function GetInstance()
 {
     if (!isset(self::$instance)) {
         $className = __CLASS__;
         self::$instance = new $className();
         // use the sqlite version for S_Drive, else use the mysql version
         if (Config::GetInstance()->sdrive) {
             include CARTREVISION . '/phphosted/database_sqlite.cls.php';
         } else {
             include CARTREVISION . '/phphosted/database_mysql.cls.php';
         }
     }
     return self::$instance;
 }