예제 #1
0
 /**
  * Sets config value
  *
  * @param string $key
  * @param string $value
  * @return value set
  */
 function set($key, $value)
 {
     $key = $this->_get_writer()->resolve_http_key($key);
     $value = $this->_get_writer()->set($key, $value);
     return parent::set($key, $value);
 }
예제 #2
0
 /**
  * Checks that config options are compatible
  *
  * @param object $config
  */
 private function _post_process_values($config)
 {
     $helper = new W3_ConfigBase($config->data);
     // caching pages with query string is not supported by Disk Basic
     if ($helper->get_boolean('pgcache.cache.query')) {
         if ($helper->get_string('pgcache.engine') == 'file_generic') {
             $config->data['pgcache.cache.query'] = false;
         }
     }
     // When feeds are cached - we have to switch on .xml files handling
     // by rules for nginx to return correct headers
     if ($helper->get_boolean('pgcache.cache.feed')) {
         if ($helper->get_string('pgcache.engine') == 'file_generic') {
             $config->data['pgcache.cache.nginx_handle_xml'] = true;
         }
     }
 }