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


PHP Zend_Cache_Core::__construct方法代碼示例

本文整理匯總了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.");
     }
 }
開發者ID:QiuLihua83,項目名稱:magento-enterprise-1.13.1.0,代碼行數:13,代碼來源:Core.php

示例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);
 }
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:15,代碼來源:Page.php

示例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)));
             }
         }
     }
 }
開發者ID:koala-framework,項目名稱:koala-framework,代碼行數:20,代碼來源:MemoryZend.php

示例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)));
             }
         }
     }
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:21,代碼來源:MemoryZend.php

示例5: __construct

 /**
  * Constructor
  *
  * @param  array $options Associative array of options
  * @return void
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     $this->_idStack = array();
 }
開發者ID:SalesOneGit,項目名稱:s1_magento,代碼行數:11,代碼來源:Output.php

示例6: __construct

 /**
  * Constructor
  * 
  * @param array $options associative array of options
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
 }
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:9,代碼來源:Output.php

示例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')));
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:5,代碼來源:Cache.php


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