Esempio n. 1
0
 /**
  * Returns an singleton instance of class.
  * 
  * @return 
  */
 public static function getInstance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new ImprovedDBMS();
     }
     return self::$instance;
 }
Esempio n. 2
0
 /**
  * Returns corresponding instance of DBMS class.
  * 
  * @return 
  */
 public static function getDBMS()
 {
     if (is_null(self::$dbmsInstance)) {
         if (self::$IMPROVED) {
             ImprovedDBMS::init(self::$config);
             self::$dbmsInstance = ImprovedDBMS::getInstance();
         } else {
             DBMS::init(self::$config);
             self::$dbmsInstance = DBMS::getInstance();
         }
     }
     return self::$dbmsInstance;
 }