当前位置: 首页>>代码示例>>PHP>>正文


PHP W3_Config::get方法代码示例

本文整理汇总了PHP中W3_Config::get方法的典型用法代码示例。如果您正苦于以下问题:PHP W3_Config::get方法的具体用法?PHP W3_Config::get怎么用?PHP W3_Config::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在W3_Config的用法示例。


在下文中一共展示了W3_Config::get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 /**
  * Runs minify
  */
 function process()
 {
     require_once W3TC_LIB_MINIFY_DIR . '/Minify.php';
     require_once W3TC_LIB_MINIFY_DIR . '/HTTP/Encoder.php';
     HTTP_Encoder::$encodeToIe6 = $this->_config->get_boolean('minify.comprss.ie6');
     Minify::$uploaderHoursBehind = $this->_config->get_integer('minify.fixtime');
     Minify::setCache($this->_get_cache());
     $serve_options = $this->_config->get_array('minify.options');
     $serve_options['maxAge'] = $this->_config->get_integer('minify.maxage');
     $serve_options['encodeOutput'] = $this->_config->get_boolean('minify.compress');
     $serve_options['postprocessor'] = array(&$this, 'postprocessor');
     if (stripos(PHP_OS, 'win') === 0) {
         Minify::setDocRoot();
     }
     foreach ($this->_config->get_array('minify.symlinks') as $link => $target) {
         $link = str_replace('//', realpath($_SERVER['DOCUMENT_ROOT']), $link);
         $link = strtr($link, '/', DIRECTORY_SEPARATOR);
         $serve_options['minifierOptions']['text/css']['symlinks'][$link] = realpath($target);
     }
     if ($this->_config->get_boolean('minify.debug')) {
         $serve_options['debug'] = true;
     }
     if ($this->_config->get('minify.debug')) {
         require_once W3TC_LIB_MINIFY_DIR . '/Minify/Logger.php';
         Minify_Logger::setLogger($this);
     }
     if (isset($_GET['f']) || isset($_GET['gg']) && isset($_GET['g']) && isset($_GET['t'])) {
         if (isset($_GET['gg']) && isset($_GET['g']) && isset($_GET['t'])) {
             $serve_options['minApp']['groups'] = $this->get_groups($_GET['gg'], $_GET['t']);
             if ($_GET['t'] == 'js' && (in_array($_GET['g'], array('include', 'include-nb')) && $this->_config->get_boolean('minify.js.combine.header') || in_array($_GET['g'], array('include-footer', 'include-footer-nb')) && $this->_config->get_boolean('minify.js.combine.footer'))) {
                 $serve_options['minifiers']['application/x-javascript'] = array($this, 'minify_stub');
             }
             /**
              * Setup user-friendly cache ID for disk cache
              */
             if ($this->_config->get_string('minify.engine') == 'file') {
                 $cacheId = sprintf('%s.%s.%s', $_GET['gg'], $_GET['g'], $_GET['t']);
                 Minify::setCacheId($cacheId);
             }
         }
         @header('Pragma: public');
         try {
             Minify::serve('MinApp', $serve_options);
         } catch (Exception $exception) {
             printf('<strong>W3 Total Cache Error:</strong> Minify error: %s', $exception->getMessage());
         }
     } else {
         die('This file cannot be accessed directly');
     }
 }
开发者ID:TheReaCompany,项目名称:pooplog,代码行数:53,代码来源:Minify.php

示例2: foreach

 /**
  * Generates file ID
  *
  * @param array $sources
  * @param string $type
  * @return string
  */
 function _generate_id($sources, $type)
 {
     $values = $sources;
     foreach ($sources as $source) {
         if (file_exists($source)) {
             $data = @file_get_contents($source);
             if ($data !== false) {
                 $values[] = md5($data);
             } else {
                 return false;
             }
         }
     }
     $keys = array('minify.debug', 'minify.engine', 'minify.options', 'minify.symlinks');
     if ($type == 'js') {
         $engine = $this->_config->get_string('minify.js.engine');
         switch ($engine) {
             case 'js':
                 $keys = array_merge($keys, array('minify.js.combine.header', 'minify.js.combine.body', 'minify.js.combine.footer', 'minify.js.strip.comments', 'minify.js.strip.crlf'));
                 break;
             case 'yuijs':
                 $keys = array_merge($keys, array('minify.yuijs.options.line-break', 'minify.yuijs.options.nomunge', 'minify.yuijs.options.preserve-semi', 'minify.yuijs.options.disable-optimizations'));
                 break;
             case 'ccjs':
                 $keys = array_merge($keys, array('minify.ccjs.options.compilation_level', 'minify.ccjs.options.formatting'));
                 break;
         }
     } elseif ($type == 'css') {
         $engine = $this->_config->get_string('minify.css.engine');
         switch ($engine) {
             case 'css':
                 $keys = array_merge($keys, array('minify.css.combine', 'minify.css.strip.comments', 'minify.css.strip.crlf', 'minify.css.imports'));
                 break;
             case 'yuicss':
                 $keys = array_merge($keys, array('minify.yuicss.options.line-break'));
                 break;
             case 'csstidy':
                 $keys = array_merge($keys, array('minify.csstidy.options.remove_bslash', 'minify.csstidy.options.compress_colors', 'minify.csstidy.options.compress_font-weight', 'minify.csstidy.options.lowercase_s', 'minify.csstidy.options.optimise_shorthands', 'minify.csstidy.options.remove_last_;', 'minify.csstidy.options.case_properties', 'minify.csstidy.options.sort_properties', 'minify.csstidy.options.sort_selectors', 'minify.csstidy.options.merge_selectors', 'minify.csstidy.options.discard_invalid_properties', 'minify.csstidy.options.css_level', 'minify.csstidy.options.preserve_css', 'minify.csstidy.options.timestamp', 'minify.csstidy.options.template'));
                 break;
         }
     }
     foreach ($keys as $key) {
         $values[] = $this->_config->get($key);
     }
     $id = substr(md5(implode('', $values)), 0, 6);
     return $id;
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:54,代码来源:Minify.php

示例3: array

 /**
  * Generates file ID
  *
  * @param array $sources
  * @param string $type
  * @return string
  */
 function _generate_id($sources, $type)
 {
     $values = array();
     foreach ($sources as $source) {
         if (is_string($source)) {
             $values[] = $source;
         } else {
             $values[] = $source->filepath;
         }
     }
     foreach ($sources as $source) {
         if (is_string($source) && file_exists($source)) {
             $data = @file_get_contents($source);
             if ($data !== false) {
                 $values[] = md5($data);
             } else {
                 return false;
             }
         } else {
             $headers = @get_headers($source->minifyOptions['prependRelativePath']);
             if (strpos($headers[0], '200') !== false) {
                 $segments = explode('.', $source->minifyOptions['prependRelativePath']);
                 $ext = strtolower(array_pop($segments));
                 $pc_source = $this->_precache_file($source->minifyOptions['prependRelativePath'], $ext);
                 $data = @file_get_contents($pc_source->filepath);
                 if ($data !== false) {
                     $values[] = md5($data);
                 } else {
                     return false;
                 }
             } else {
                 return false;
             }
         }
     }
     $keys = array('minify.debug', 'minify.engine', 'minify.options', 'minify.symlinks');
     if ($type == 'js') {
         $engine = $this->_config->get_string('minify.js.engine');
         switch ($engine) {
             case 'js':
                 $keys = array_merge($keys, array('minify.js.combine.header', 'minify.js.combine.body', 'minify.js.combine.footer', 'minify.js.strip.comments', 'minify.js.strip.crlf'));
                 break;
             case 'yuijs':
                 $keys = array_merge($keys, array('minify.yuijs.options.line-break', 'minify.yuijs.options.nomunge', 'minify.yuijs.options.preserve-semi', 'minify.yuijs.options.disable-optimizations'));
                 break;
             case 'ccjs':
                 $keys = array_merge($keys, array('minify.ccjs.options.compilation_level', 'minify.ccjs.options.formatting'));
                 break;
         }
     } elseif ($type == 'css') {
         $engine = $this->_config->get_string('minify.css.engine');
         switch ($engine) {
             case 'css':
                 $keys = array_merge($keys, array('minify.css.combine', 'minify.css.strip.comments', 'minify.css.strip.crlf', 'minify.css.imports'));
                 break;
             case 'yuicss':
                 $keys = array_merge($keys, array('minify.yuicss.options.line-break'));
                 break;
             case 'csstidy':
                 $keys = array_merge($keys, array('minify.csstidy.options.remove_bslash', 'minify.csstidy.options.compress_colors', 'minify.csstidy.options.compress_font-weight', 'minify.csstidy.options.lowercase_s', 'minify.csstidy.options.optimise_shorthands', 'minify.csstidy.options.remove_last_;', 'minify.csstidy.options.case_properties', 'minify.csstidy.options.sort_properties', 'minify.csstidy.options.sort_selectors', 'minify.csstidy.options.merge_selectors', 'minify.csstidy.options.discard_invalid_properties', 'minify.csstidy.options.css_level', 'minify.csstidy.options.preserve_css', 'minify.csstidy.options.timestamp', 'minify.csstidy.options.template'));
                 break;
         }
     }
     foreach ($keys as $key) {
         $values[] = $this->_config->get($key);
     }
     $id = substr(md5(implode('', $this->_flatten_array($values))), 0, 6);
     return $id;
 }
开发者ID:easinewe,项目名称:Avec2016,代码行数:76,代码来源:Minify.php

示例4: w3_config_save

/**
 * Save config, can't decline save process. (difference from action_save)
 *
 * Do some actions on config keys update
 * Used in several places such as:
 *
 * 1. common config save
 * 2. import settings
 *
 * @param W3_Config $current_config
 * @param W3_Config $new_config
 * @param W3_ConfigAdmin $new_config_admin
 * @return bool
 * @throws Exception
 */
function w3_config_save($current_config, $new_config, $new_config_admin)
{
    $master_config = $new_config->is_master() ? $new_config : new W3_Config(true);
    if ($master_config->get_integer('common.instance_id', 0) == 0) {
        $master_config->set('common.instance_id', mt_rand());
        if (!$new_config->is_master()) {
            $master_config->save();
        }
    }
    $old_config = new W3_Config();
    $browsercache_dependencies = array();
    if ($new_config->get_boolean('browsercache.enabled')) {
        $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.cssjs.replace', 'browsercache.html.replace', 'browsercache.other.replace'));
        if ($new_config->get_boolean('browsercache.cssjs.replace')) {
            $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.cssjs.compression', 'browsercache.cssjs.expires', 'browsercache.cssjs.lifetime', 'browsercache.cssjs.cache.control', 'browsercache.cssjs.cache.policy', 'browsercache.cssjs.etag', 'browsercache.cssjs.w3tc'));
        }
        if ($new_config->get_boolean('browsercache.html.replace')) {
            $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.html.compression', 'browsercache.html.expires', 'browsercache.html.lifetime', 'browsercache.html.cache.control', 'browsercache.html.cache.policy', 'browsercache.html.etag', 'browsercache.html.w3tc'));
        }
        if ($new_config->get_boolean('browsercache.other.replace')) {
            $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.other.compression', 'browsercache.other.expires', 'browsercache.other.lifetime', 'browsercache.other.cache.control', 'browsercache.other.cache.policy', 'browsercache.other.etag', 'browsercache.other.w3tc'));
        }
    }
    /**
     * Show need empty page cache notification
     */
    if ($new_config->get_boolean('pgcache.enabled')) {
        $pgcache_dependencies = array_merge($browsercache_dependencies, array('pgcache.debug', 'dbcache.enabled', 'objectcache.enabled', 'minify.enabled', 'mobile.enabled', 'referrer.enabled'));
        if ($new_config->get_boolean('dbcache.enabled')) {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('dbcache.debug'));
        }
        if ($new_config->get_boolean('objectcache.enabled')) {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('objectcache.debug'));
        }
        if ($new_config->get_boolean('minify.enabled')) {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('minify.auto', 'minify.debug', 'minify.rewrite', 'minify.html.enable', 'minify.html.engine', 'minify.html.inline.css', 'minify.html.inline.js', 'minify.html.strip.crlf', 'minify.html.comments.ignore', 'minify.css.enable', 'minify.css.engine', 'minify.css.groups', 'minify.js.enable', 'minify.js.engine', 'minify.js.groups', 'minify.htmltidy.options.clean', 'minify.htmltidy.options.hide-comments', 'minify.htmltidy.options.wrap', 'minify.reject.logged', 'minify.reject.ua', 'minify.reject.uri'));
        }
        /**
         * @var W3_ModuleStatus $modules
         */
        $modules = w3_instance('W3_ModuleStatus');
        if ($modules->is_running('cdn')) {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('cdn.enabled', 'cdn.debug', 'cdn.engine', 'cdn.uploads.enable', 'cdn.includes.enable', 'cdn.includes.files', 'cdn.theme.enable', 'cdn.theme.files', 'cdn.minify.enable', 'cdn.custom.enable', 'cdn.custom.files', 'cdn.ftp.domain', 'cdn.ftp.ssl', 'cdn.s3.cname', 'cdn.s3.ssl', 'cdn.cf.cname', 'cdn.cf.ssl', 'cdn.cf2.cname', 'cdn.cf2.ssl', 'cdn.rscf.cname', 'cdn.rscf.ssl', 'cdn.azure.cname', 'cdn.azure.ssl', 'cdn.mirror.domain', 'cdn.mirror.ssl', 'cdn.netdna.domain', 'cdn.netdna.ssl', 'cdn.cotendo.domain', 'cdn.cotendo.ssl', 'cdn.edgecast.domain', 'cdn.edgecast.ssl', 'cdn.att.domain', 'cdn.att.ssl', 'cdn.reject.logged_roles', 'cdn.reject.roles', 'cdn.reject.ua', 'cdn.reject.uri', 'cdn.reject.files'));
        } elseif ($old_config->get_boolean('cdn.enabled') && !$new_config->get_boolean('cdn.enabled')) {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('cdn.enabled'));
        }
        if ($new_config->get_boolean('mobile.enabled')) {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('mobile.rgroups'));
        }
        if ($new_config->get_boolean('referrer.enabled')) {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('referrer.rgroups'));
        }
        if ($new_config->get_boolean('browsercache.enabled') && $new_config->get_string('pgcache.engine') == 'file_generic') {
            $pgcache_dependencies = array_merge($pgcache_dependencies, array('browsercache.html.last_modified', 'browsercache.other.last_modified'));
        }
        $old_pgcache_dependencies_values = array();
        $new_pgcache_dependencies_values = array();
        foreach ($pgcache_dependencies as $pgcache_dependency) {
            $old_pgcache_dependencies_values[] = $old_config->get($pgcache_dependency);
            $new_pgcache_dependencies_values[] = $new_config->get($pgcache_dependency);
        }
        if (serialize($old_pgcache_dependencies_values) != serialize($new_pgcache_dependencies_values)) {
            $new_config->set('notes.need_empty_pgcache', true);
        }
    }
    /**
     * Show need empty minify notification
     */
    if ($current_config->get_boolean('minify.enabled') && $new_config->get_boolean('minify.enabled') && ($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups'))) || $new_config->get_boolean('minify.js.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.js.groups'))))) {
        $minify_dependencies = array_merge($browsercache_dependencies, array('minify.auto', 'minify.debug', 'minify.options', 'minify.symlinks', 'minify.css.enable', 'minify.js.enable'));
        if ($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups')))) {
            $minify_dependencies = array_merge($minify_dependencies, array('minify.css.engine', 'minify.css.combine', 'minify.css.strip.comments', 'minify.css.strip.crlf', 'minify.css.imports', 'minify.css.groups', 'minify.yuicss.path.java', 'minify.yuicss.path.jar', 'minify.yuicss.options.line-break', 'minify.csstidy.options.remove_bslash', 'minify.csstidy.options.compress_colors', 'minify.csstidy.options.compress_font-weight', 'minify.csstidy.options.lowercase_s', 'minify.csstidy.options.optimise_shorthands', 'minify.csstidy.options.remove_last_;', 'minify.csstidy.options.case_properties', 'minify.csstidy.options.sort_properties', 'minify.csstidy.options.sort_selectors', 'minify.csstidy.options.merge_selectors', 'minify.csstidy.options.discard_invalid_properties', 'minify.csstidy.options.css_level', 'minify.csstidy.options.preserve_css', 'minify.csstidy.options.timestamp', 'minify.csstidy.options.template'));
        }
        if ($new_config->get_boolean('minify.js.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.js.groups')))) {
            $minify_dependencies = array_merge($minify_dependencies, array('minify.js.engine', 'minify.js.combine.header', 'minify.js.combine.body', 'minify.js.combine.footer', 'minify.js.strip.comments', 'minify.js.strip.crlf', 'minify.js.groups', 'minify.yuijs.path.java', 'minify.yuijs.path.jar', 'minify.yuijs.options.line-break', 'minify.yuijs.options.nomunge', 'minify.yuijs.options.preserve-semi', 'minify.yuijs.options.disable-optimizations', 'minify.ccjs.path.java', 'minify.ccjs.path.jar', 'minify.ccjs.options.compilation_level', 'minify.ccjs.options.formatting'));
        }
        /**
         * @var W3_ModuleStatus $modules
         */
        $modules = w3_instance('W3_ModuleStatus');
        if ($modules->is_running('cdn')) {
            $minify_dependencies = array_merge($minify_dependencies, array('cdn.engine', 'cdn.enabled'));
        } elseif ($old_config->get_boolean('cdn.enabled') && !$new_config->get_boolean('cdn.enabled')) {
            $minify_dependencies = array_merge($minify_dependencies, array('cdn.enabled'));
        }
//.........这里部分代码省略.........
开发者ID:easinewe,项目名称:Avec2016,代码行数:101,代码来源:admin.php

示例5: array

 /**
  * Save config action
  *
  * Do some actions on config keys update
  * Used in several places such as:
  *
  * 1. common config save
  * 2. import settings
  * 3. enable/disable preview mode
  *
  * @param W3_Config $old_config
  * @param W3_Config $new_config
  * @param boolean $preview
  * @return void
  */
 function config_save(&$old_config, &$new_config, $preview = null)
 {
     $browsercache_dependencies = array();
     if ($new_config->get_boolean('browsercache.enabled')) {
         $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.cssjs.replace', 'browsercache.html.replace', 'browsercache.other.replace'));
         if ($new_config->get_boolean('browsercache.cssjs.replace')) {
             $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.cssjs.compression', 'browsercache.cssjs.expires', 'browsercache.cssjs.lifetime', 'browsercache.cssjs.cache.control', 'browsercache.cssjs.cache.policy', 'browsercache.cssjs.etag', 'browsercache.cssjs.w3tc'));
         }
         if ($new_config->get_boolean('browsercache.html.replace')) {
             $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.html.compression', 'browsercache.html.expires', 'browsercache.html.lifetime', 'browsercache.html.cache.control', 'browsercache.html.cache.policy', 'browsercache.html.etag', 'browsercache.html.w3tc'));
         }
         if ($new_config->get_boolean('browsercache.other.replace')) {
             $browsercache_dependencies = array_merge($browsercache_dependencies, array('browsercache.other.compression', 'browsercache.other.expires', 'browsercache.other.lifetime', 'browsercache.other.cache.control', 'browsercache.other.cache.policy', 'browsercache.other.etag', 'browsercache.other.w3tc'));
         }
     }
     /**
      * Show need empty page cache notification
      */
     if ($new_config->get_boolean('pgcache.enabled')) {
         $pgcache_dependencies = array_merge($browsercache_dependencies, array('pgcache.debug', 'dbcache.enabled', 'objectcache.enabled', 'minify.enabled', 'cdn.enabled', 'mobile.enabled', 'referrer.enabled'));
         if ($new_config->get_boolean('dbcache.enabled')) {
             $pgcache_dependencies = array_merge($pgcache_dependencies, array('dbcache.debug'));
         }
         if ($new_config->get_boolean('objectcache.enabled')) {
             $pgcache_dependencies = array_merge($pgcache_dependencies, array('objectcache.debug'));
         }
         if ($new_config->get_boolean('minify.enabled')) {
             $pgcache_dependencies = array_merge($pgcache_dependencies, array('minify.auto', 'minify.debug', 'minify.rewrite', 'minify.html.enable', 'minify.html.engine', 'minify.html.inline.css', 'minify.html.inline.js', 'minify.html.strip.crlf', 'minify.html.comments.ignore', 'minify.css.enable', 'minify.css.groups', 'minify.js.enable', 'minify.js.groups', 'minify.htmltidy.options.clean', 'minify.htmltidy.options.hide-comments', 'minify.htmltidy.options.wrap', 'minify.reject.logged', 'minify.reject.ua', 'minify.reject.uri'));
         }
         if ($new_config->get_boolean('cdn.enabled')) {
             $pgcache_dependencies = array_merge($pgcache_dependencies, array('cdn.debug', 'cdn.engine', 'cdn.uploads.enable', 'cdn.includes.enable', 'cdn.includes.files', 'cdn.theme.enable', 'cdn.theme.files', 'cdn.minify.enable', 'cdn.custom.enable', 'cdn.custom.files', 'cdn.mirror.domain', 'cdn.mirror.ssl', 'cdn.netdna.domain', 'cdn.netdna.ssl', 'cdn.cotendo.domain', 'cdn.cotendo.ssl', 'cdn.ftp.domain', 'cdn.ftp.ssl', 'cdn.s3.cname', 'cdn.s3.ssl', 'cdn.cf.cname', 'cdn.cf.ssl', 'cdn.cf2.cname', 'cdn.cf2.ssl', 'cdn.rscf.cname', 'cdn.rscf.ssl', 'cdn.azure.cname', 'cdn.azure.ssl', 'cdn.reject.admins', 'cdn.reject.ua', 'cdn.reject.uri', 'cdn.reject.files'));
         }
         if ($new_config->get_boolean('mobile.enabled')) {
             $pgcache_dependencies = array_merge($pgcache_dependencies, array('mobile.rgroups'));
         }
         if ($new_config->get_boolean('referrer.enabled')) {
             $pgcache_dependencies = array_merge($pgcache_dependencies, array('referrer.rgroups'));
         }
         $old_pgcache_dependencies_values = array();
         $new_pgcache_dependencies_values = array();
         foreach ($pgcache_dependencies as $pgcache_dependency) {
             $old_pgcache_dependencies_values[] = $old_config->get($pgcache_dependency);
             $new_pgcache_dependencies_values[] = $new_config->get($pgcache_dependency);
         }
         if (serialize($old_pgcache_dependencies_values) != serialize($new_pgcache_dependencies_values)) {
             $new_config->set('notes.need_empty_pgcache', true);
         }
     }
     /**
      * Show need empty minify notification
      */
     if ($new_config->get_boolean('minify.enabled') && ($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups'))) || $new_config->get_boolean('minify.js.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.js.groups'))))) {
         $minify_dependencies = array_merge($browsercache_dependencies, array('minify.auto', 'minify.debug', 'minify.options', 'minify.symlinks', 'minify.css.enable', 'minify.js.enable'));
         if ($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups')))) {
             $minify_dependencies = array_merge($minify_dependencies, array('minify.css.engine', 'minify.css.combine', 'minify.css.strip.comments', 'minify.css.strip.crlf', 'minify.css.imports', 'minify.css.groups', 'minify.yuicss.path.java', 'minify.yuicss.path.jar', 'minify.yuicss.options.line-break', 'minify.csstidy.options.remove_bslash', 'minify.csstidy.options.compress_colors', 'minify.csstidy.options.compress_font-weight', 'minify.csstidy.options.lowercase_s', 'minify.csstidy.options.optimise_shorthands', 'minify.csstidy.options.remove_last_;', 'minify.csstidy.options.case_properties', 'minify.csstidy.options.sort_properties', 'minify.csstidy.options.sort_selectors', 'minify.csstidy.options.merge_selectors', 'minify.csstidy.options.discard_invalid_properties', 'minify.csstidy.options.css_level', 'minify.csstidy.options.preserve_css', 'minify.csstidy.options.timestamp', 'minify.csstidy.options.template'));
         }
         if ($new_config->get_boolean('minify.js.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.js.groups')))) {
             $minify_dependencies = array_merge($minify_dependencies, array('minify.js.engine', 'minify.js.combine.header', 'minify.js.combine.body', 'minify.js.combine.footer', 'minify.js.strip.comments', 'minify.js.strip.crlf', 'minify.js.groups', 'minify.yuijs.path.java', 'minify.yuijs.path.jar', 'minify.yuijs.options.line-break', 'minify.yuijs.options.nomunge', 'minify.yuijs.options.preserve-semi', 'minify.yuijs.options.disable-optimizations', 'minify.ccjs.path.java', 'minify.ccjs.path.jar', 'minify.ccjs.options.compilation_level', 'minify.ccjs.options.formatting'));
         }
         $old_minify_dependencies_values = array();
         $new_minify_dependencies_values = array();
         foreach ($minify_dependencies as $minify_dependency) {
             $old_minify_dependencies_values[] = $old_config->get($minify_dependency);
             $new_minify_dependencies_values[] = $new_config->get($minify_dependency);
         }
         if (serialize($old_minify_dependencies_values) != serialize($new_minify_dependencies_values)) {
             $new_config->set('notes.need_empty_minify', true);
         }
     }
     if ($new_config->get_boolean('cdn.enabled') && !w3_is_cdn_mirror($new_config->get_string('cdn.engine'))) {
         /**
          * Show notification when CDN enabled
          */
         if (!$old_config->get_boolean('cdn.enabled')) {
             $new_config->set('notes.cdn_upload', true);
         }
         /**
          * Show notification when Browser Cache settings changes
          */
         $cdn_dependencies = array('browsercache.enabled');
         if ($new_config->get_boolean('cdn.enabled')) {
             $cdn_dependencies = array('browsercache.cssjs.compression', 'browsercache.cssjs.expires', 'browsercache.cssjs.lifetime', 'browsercache.cssjs.cache.control', 'browsercache.cssjs.cache.policy', 'browsercache.cssjs.etag', 'browsercache.cssjs.w3tc', 'browsercache.html.compression', 'browsercache.html.expires', 'browsercache.html.lifetime', 'browsercache.html.cache.control', 'browsercache.html.cache.policy', 'browsercache.html.etag', 'browsercache.html.w3tc', 'browsercache.other.compression', 'browsercache.other.expires', 'browsercache.other.lifetime', 'browsercache.other.cache.control', 'browsercache.other.cache.policy', 'browsercache.other.etag', 'browsercache.other.w3tc');
         }
         $old_cdn_dependencies_values = array();
         $new_cdn_dependencies_values = array();
//.........这里部分代码省略.........
开发者ID:niko-lgdcom,项目名称:archives,代码行数:101,代码来源:TotalCache.php


注:本文中的W3_Config::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。