config_handlers.xml: autoload.xml: %core.lib_dir%/ConfigDirectivesConfigHandler.class.php orderConfigurations(AgaviConfigCache::parseConfig($config, false, $this->getValidationFile())->configurations, AgaviConfig::get('core.environment'), $context); $code = ''; foreach($configurations as $cfg) { $code .= $this->convert($cfg); } date_default_timezone_set('GMT'); // compile data $retval = ""; $retval = sprintf($retval, date('m/d/Y H:i:s'), $code); return $retval; } /** * * @param AgaviConfigValueHolder The config value to convert. * * @author Veikko Makinen */ protected function convert(AgaviConfigValueHolder $item) { $prefix = ''; $data = ''; foreach($item->getChildren() as $directives) { $prefix = $directives->getAttribute('prefix', ''); foreach($directives->getChildren() as $directive) { $name = ($prefix ? $prefix.'.' : '') . $directive->getAttribute('name'); $value = var_export($this->literalize($this->replaceConstants($directive->getValue())), true); $data .= "AgaviConfig::set('$name', $value); \n"; } } return $data; } } ?>