/** * Returns an singleton instance of class. * * @return */ public static function getInstance() { if (is_null(self::$instance)) { self::$instance = new ImprovedDBMS(); } return self::$instance; }
/** * 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; }