本文整理匯總了PHP中Zend_Cache_Core::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Cache_Core::__construct方法的具體用法?PHP Zend_Cache_Core::__construct怎麽用?PHP Zend_Cache_Core::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Cache_Core
的用法示例。
在下文中一共展示了Zend_Cache_Core::__construct方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @throws Varien_Exception
* @param array|Zend_Config $options Associative array of options or Zend_Config instance
*/
public function __construct($options = array())
{
parent::__construct($options);
if (!is_numeric($this->getOption('slab_size'))) {
throw new Varien_Exception("Invalid value for the node <slab_size>. Expected to be integer.");
}
}
示例2: __construct
/**
* Constructor
*
* @param array $options associative array of options
* @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested
*/
public function __construct($options = array())
{
if (isset($options['httpConditional'])) {
if ($options['httpConditional']) {
Zend_Cache::throwException('httpConditional is not implemented for the moment !');
}
}
parent::__construct($options);
}
示例3: __construct
public function __construct()
{
$options = array('lifetime' => null, 'write_control' => false, 'automatic_cleaning_factor' => 0, 'automatic_serialization' => true);
parent::__construct($options);
$be = Kwf_Cache_Simple::getBackend();
if ($be == 'memcache' || $be == 'redis') {
throw new Kwf_Exception("don't use thru Zend_Cache");
} else {
if ($be == 'apc') {
$this->setBackend(new Kwf_Cache_Backend_Apc());
} else {
if ($be == 'apcu') {
$this->setBackend(new Kwf_Cache_Backend_Apcu());
} else {
//fallback to file backend (NOT recommended!)
$this->setBackend(new Kwf_Cache_Backend_File(array('cache_dir' => 'cache/view', 'hashed_directory_level' => 2)));
}
}
}
}
示例4: __construct
public function __construct()
{
$options = array('lifetime' => null, 'write_control' => false, 'automatic_cleaning_factor' => 0, 'automatic_serialization' => true);
parent::__construct($options);
$be = Kwf_Cache_Simple::getBackend();
if ($be == 'elastiCache') {
$this->setBackend(new Kwf_Util_Aws_ElastiCache_CacheBackend(array('cacheClusterId' => Kwf_Config::getValue('aws.simpleCacheCluster'), 'compression' => true)));
//do *not* use cache_namespace for this cache (we don't want to delete it on clear-cache)
} else {
if ($be == 'memcache') {
throw new Kwf_Exception("don't use thru Zend_Cache");
} else {
if ($be == 'apc') {
$this->setBackend(new Kwf_Cache_Backend_Apc());
} else {
//fallback to file backend (NOT recommended!)
$this->setBackend(new Kwf_Cache_Backend_File(array('cache_dir' => 'cache/view', 'hashed_directory_level' => 2)));
}
}
}
}
示例5: __construct
/**
* Constructor
*
* @param array $options Associative array of options
* @return void
*/
public function __construct(array $options = array())
{
parent::__construct($options);
$this->_idStack = array();
}
示例6: __construct
/**
* Constructor
*
* @param array $options associative array of options
*/
public function __construct($options = array())
{
parent::__construct($options);
}
示例7: __construct
public function __construct()
{
parent::__construct(array('automatic_serialization' => true, 'lifetime' => null, 'automatic_cleaning_factor' => 0));
$this->setBackend(new Kwf_Cache_Backend_File(array('cache_dir' => 'cache/config')));
}