/** * Loads the modX system configuration settings. * * @access protected * @return boolean True if successful. */ protected function _loadConfig() { $this->config = $this->_config; $this->getCacheManager(); $config = $this->cacheManager->get('config', array(xPDO::OPT_CACHE_KEY => $this->getOption('cache_system_settings_key', null, 'system_settings'), xPDO::OPT_CACHE_HANDLER => $this->getOption('cache_system_settings_handler', null, $this->getOption(xPDO::OPT_CACHE_HANDLER)), xPDO::OPT_CACHE_FORMAT => (int) $this->getOption('cache_system_settings_format', null, $this->getOption(xPDO::OPT_CACHE_FORMAT, null, xPDOCacheManager::CACHE_PHP)))); if (empty($config)) { $config = $this->cacheManager->generateConfig(); } if (empty($config)) { $config = array(); if (!($settings = $this->getCollection('modSystemSetting'))) { return false; } foreach ($settings as $setting) { $config[$setting->get('key')] = $setting->get('value'); } } $this->config = array_merge($this->config, $config); $this->_systemConfig = $this->config; return true; }
/** * @param $key * @param array $options * * @return mixed */ public function get($key, $options = array()) { return $this->cacheManager->get($key, $options); }