Exemplo n.º 1
0
 /**
  * Returns singleton oxConfig object instance or create new if needed
  *
  * @return oxConfig
  */
 public static function getInstance()
 {
     if (!self::$_instance instanceof oxConfig) {
         //exceptions from here go directly to global exception handler
         //if no init is possible whole application has to die!
         self::$_instance = new oxConfig();
     }
     return self::$_instance;
 }
Exemplo n.º 2
0
 /**
  * Returns singleton oxConfig object instance or create new if needed
  *
  * @return oxConfig
  */
 public static function getInstance()
 {
     if (defined('OXID_PHP_UNIT')) {
         if (isset(modConfig::$unitMOD) && is_object(modConfig::$unitMOD)) {
             return modConfig::$unitMOD;
         }
     }
     if (!self::$_instance instanceof oxConfig) {
         //exceptions from here go directly to global exception handler
         //if no init is possible whole application has to die!
         self::$_instance = new oxConfig();
         self::$_instance->init();
     }
     return self::$_instance;
 }