當前位置: 首頁>>代碼示例>>PHP>>正文


PHP W3_Config::instance方法代碼示例

本文整理匯總了PHP中W3_Config::instance方法的典型用法代碼示例。如果您正苦於以下問題:PHP W3_Config::instance方法的具體用法?PHP W3_Config::instance怎麽用?PHP W3_Config::instance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在W3_Config的用法示例。


在下文中一共展示了W3_Config::instance方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * PHP5-style constructor
  */
 function __construct()
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $config =& W3_Config::instance();
     $this->_debug = $config->get_boolean('varnish.debug');
     $this->_servers = $config->get_array('varnish.servers');
     $this->_timeout = $config->get_integer('timelimit.varnish_purge');
 }
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:11,代碼來源:Varnish.php

示例2: __construct

 /**
  * PHP5 Constructor
  */
 function __construct()
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $this->_config =& W3_Config::instance();
     $this->_debug = $this->_config->get_boolean('pgcache.debug');
     $this->_lifetime = $this->_config->get_integer('pgcache.lifetime');
     $this->_enhanced_mode = $this->_config->get_string('pgcache.engine') == 'file_pgcache';
 }
開發者ID:kennethreitz-archive,項目名稱:wordpress-skeleton,代碼行數:11,代碼來源:PgCache.php

示例3: __construct

 /**
  * PHP5 constructor
  *
  * @param string $dbuser
  * @param string $dbpassword
  * @param string $dbname
  * @param string $dbhost
  */
 function __construct($dbuser, $dbpassword, $dbname, $dbhost)
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $this->_config =& W3_Config::instance();
     $this->_lifetime = $this->_config->get_integer('dbcache.lifetime');
     if ($this->_can_ob()) {
         ob_start(array(&$this, 'ob_callback'));
     }
     parent::__construct($dbuser, $dbpassword, $dbname, $dbhost);
 }
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:18,代碼來源:Db.php

示例4: __construct

 /**
  * PHP5-style constructor
  */
 function __construct()
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $config =& W3_Config::instance();
     $this->groups = $config->get_array('mobile.rgroups');
 }
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:9,代碼來源:Mobile.php

示例5: w3_get_nginx_rules_path

/**
 * Returns nginx rules path
 *
 * @return string
 */
function w3_get_nginx_rules_path()
{
    require_once W3TC_LIB_W3_DIR . '/Config.php';
    $config =& W3_Config::instance();
    $path = $config->get_string('config.path');
    if (!$path) {
        $path = w3_get_document_root() . '/nginx.conf';
    }
    return $path;
}
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:15,代碼來源:define.php

示例6: __construct

 /**
  * PHP5-style constructor
  */
 function __construct()
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $config =& W3_Config::instance();
     $this->key = $config->get_string('widget.pagespeed.key');
 }
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:9,代碼來源:PageSpeed.php

示例7: __construct

 /**
  * PHP5 Constructor
  */
 function __construct()
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $this->_config =& W3_Config::instance();
 }
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:8,代碼來源:Plugin.php

示例8: __construct

 /**
  * PHP5 Constructor
  */
 function __construct()
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $this->_config =& W3_Config::instance();
     $this->_debug = $this->_config->get_boolean('pgcache.debug');
     $this->_request_uri = $_SERVER['REQUEST_URI'];
     $this->_lifetime = $this->_config->get_integer('browsercache.html.lifetime');
     $this->_enhanced_mode = $this->_config->get_string('pgcache.engine') == 'file_generic';
     if ($this->_config->get_boolean('mobile.enabled')) {
         require_once W3TC_LIB_W3_DIR . '/Mobile.php';
         $this->_mobile =& W3_Mobile::instance();
     }
     if ($this->_config->get_boolean('referrer.enabled')) {
         require_once W3TC_LIB_W3_DIR . '/Referrer.php';
         $this->_referrer =& W3_Referrer::instance();
     }
 }
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:20,代碼來源:PgCache.php

示例9: __construct

 /**
  * PHP5 style constructor
  */
 function __construct()
 {
     require_once W3TC_LIB_W3_DIR . '/Config.php';
     $this->_config =& W3_Config::instance();
     $this->_lifetime = $this->_config->get_integer('objectcache.lifetime');
     $this->_debug = $this->_config->get_boolean('objectcache.debug');
     $this->global_groups = $this->_config->get_array('objectcache.groups.global');
     $this->nonpersistent_groups = $this->_config->get_array('objectcache.groups.nonpersistent');
     $this->_caching = $this->_can_cache();
     $GLOBALS['_wp_using_ext_object_cache'] = $this->_caching;
     if ($this->_can_ob()) {
         ob_start(array(&$this, 'ob_callback'));
     }
 }
開發者ID:niko-lgdcom,項目名稱:archives,代碼行數:17,代碼來源:ObjectCache.php


注:本文中的W3_Config::instance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。