/** * Initializes the module. * This method is required by IModule. * It reads the CacheModule property. * @param TXmlElement module configuration */ public function init($config) { if ($this->_cacheModuleID === '') { throw new TConfigurationException('cachesession_cachemoduleid_required'); } else { if (($cache = $this->getApplication()->getModule($this->_cacheModuleID)) === null) { throw new TConfigurationException('cachesession_cachemodule_inexistent', $this->_cacheModuleID); } else { if ($cache instanceof ICache) { $this->_cache = $cache; } else { throw new TConfigurationException('cachesession_cachemodule_invalid', $this->_cacheModuleID); } } } $this->setUseCustomStorage(true); parent::init($config); }