本文整理汇总了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');
}
示例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';
}
示例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);
}
示例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');
}
示例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;
}
示例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');
}
示例7: __construct
/**
* PHP5 Constructor
*/
function __construct()
{
require_once W3TC_LIB_W3_DIR . '/Config.php';
$this->_config =& W3_Config::instance();
}
示例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();
}
}
示例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'));
}
}