/** * Returns Singelton instance * * @return oxdb */ public static function getInstance() { // disable caching for test modules if (defined('OXID_PHP_UNIT')) { self::$_instance = modInstances::getMod(__CLASS__); } if (!self::$_instance instanceof oxDb) { //do not use simple oxNew here as it goes to eternal cycle self::$_instance = oxNew('oxdb'); if (defined('OXID_PHP_UNIT')) { modInstances::addMod(__CLASS__, self::$_instance); } } return self::$_instance; }