/** * Fetch all config ini vars into current object * * @param array $array */ private static function _fetch() { $file = CONFIG_DIR . DS . self::getEnvironment() . '.ini'; // copy default file to custom one if (!is_file($file)) { copy(CONFIG_DIR . DS . 'default.ini', $file); } $array = parse_ini_file($file, true); self::$_cache = new stdClass(); foreach ($array as $section => $values) { if (is_array($values)) { self::$_cache->{$section} = new stdClass(); foreach ($values as $k => $v) { self::$_cache->{$section}->{$k} = $v; } } } }
/** * Set cache adapter * * @param Cache_Interface $core */ public static function setCacheCore($core) { self::$_cache = $core; }