/** * Lädt die Config files und mergt sie zusammen * * @param bool $reload * * @return bool */ public static function load($reload = false) { if ($reload) { unset(self::$config_data); self::$config_data = null; unset(self::$config_data_object); self::$config_data_object = null; } if (self::$config_data == null) { if (defined('APPLICATION_ROOT') && defined('APPLICATION_ENV')) { $config_core = self::mergeRecursive(include APPLICATION_ROOT . 'system/core/config/main.config.php', include APPLICATION_ROOT . 'system/core/config/' . APPLICATION_ENV . '.config.php'); $config_custom = self::mergeRecursive(include APPLICATION_ROOT . 'system/custom/config/main.config.php', include APPLICATION_ROOT . 'system/custom/config/' . APPLICATION_ENV . '.config.php'); $localConfigFile = APPLICATION_ROOT . 'system/custom/config/local.' . APPLICATION_ENV . '.config.php'; if (file_exists($localConfigFile)) { $config_custom = self::mergeRecursive($config_custom, (array) (include $localConfigFile)); } self::$config_data = self::mergeRecursive($config_core, $config_custom); self::$config_data_object = new RecursiveArrayObject(self::$config_data); return true; } else { return false; } } else { return true; } }