本文整理汇总了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')));
}