public function init($config)
{
$this->loadParameters($config);
if ($this->_paramFile !== null) {
$configFile = null;
if ($this->getApplication()->getConfigurationType() == TApplication::CONFIG_TYPE_XML && ($cache = $this->getApplication()->getCache()) !== null) {
$cacheKey = 'TParameterModule:' . $this->_paramFile;
if (($configFile = $cache->get($cacheKey)) === false) {
$configFile = new TXmlDocument();
$configFile->loadFromFile($this->_paramFile);
$cache->set($cacheKey, $configFile, 0, new TFileCacheDependency($this->_paramFile));
}
} else {
if ($this->getApplication()->getConfigurationType() == TApplication::CONFIG_TYPE_PHP) {
$configFile = (include $this->_paramFile);
} else {
$configFile = new TXmlDocument();
$configFile->loadFromFile($this->_paramFile);
}
}
$this->loadParameters($configFile);
}
$this->_initialized = true;
}