当前位置: 首页>>代码示例>>PHP>>正文


PHP Cache_Lite::__construct方法代码示例

本文整理汇总了PHP中Cache_Lite::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Cache_Lite::__construct方法的具体用法?PHP Cache_Lite::__construct怎么用?PHP Cache_Lite::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cache_Lite的用法示例。


在下文中一共展示了Cache_Lite::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 /**
  * Constructor
  *
  * $options is an assoc. To have a look at availables options,
  * see the constructor of the Cache_Lite class in 'Cache_Lite.php'
  *
  * Comparing to Cache_Lite constructor, there is another option :
  * $options = array(
  *     (...) see Cache_Lite constructor
  *     'defaultGroup' => default cache group for function caching (string)
  * );
  *
  * @param array $options options
  * @access public
  */
 function __construct($options = array(NULL))
 {
     if (isset($options['defaultGroup'])) {
         $this->_defaultGroup = $options['defaultGroup'];
     }
     parent::__construct($options);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:22,代码来源:Function.php

示例2: __construct

 public function __construct($id, $group = null)
 {
     global $config;
     $this->cache_id = $id;
     if ($group) {
         $this->cache_group = $group;
     }
     $options = array('lifeTime' => \HodgePodge\Core\Cache::$lifetime[$group ?: 'default'] ?: 3600, 'pearErrorMode' => CACHE_LITE_ERROR_DIE, 'cacheDir' => $config['cache_dir'] ?: $config['cache']['dir'], 'automaticSerialization' => true);
     parent::__construct($options);
 }
开发者ID:brokencube,项目名称:hodgepodge,代码行数:10,代码来源:CacheLite.php

示例3: array

 /**
  * Constructor
  *
  * $options is an assoc. To have a look at availables options,
  * see the constructor of the Cache_Lite class in 'Cache_Lite.php'
  *
  * Comparing to Cache_Lite constructor, there is another option :
  * $options = array(
  *     (...) see Cache_Lite constructor
  *     'debugCacheLiteFunction' => (bool) debug the caching process,
  *     'defaultGroup' => default cache group for function caching (string),
  *     'dontCacheWhenTheOutputContainsNOCACHE' => (bool) don't cache when the function output contains "NOCACHE",
  *     'dontCacheWhenTheResultIsFalse' => (bool) don't cache when the function result is false,
  *     'dontCacheWhenTheResultIsNull' => (bool don't cache when the function result is null
  * );
  *
  * @param array $options options
  * @access public
  */
 function __construct($options = array(NULL))
 {
     $availableOptions = array('debugCacheLiteFunction', 'defaultGroup', 'dontCacheWhenTheOutputContainsNOCACHE', 'dontCacheWhenTheResultIsFalse', 'dontCacheWhenTheResultIsNull');
     while (list($name, $value) = each($options)) {
         if (in_array($name, $availableOptions)) {
             $property = '_' . $name;
             $this->{$property} = $value;
         }
     }
     reset($options);
     parent::__construct($options);
 }
开发者ID:jimjag,项目名称:Serendipity,代码行数:31,代码来源:Function.php

示例4: array

 /**
  * Constructor
  *
  * $options is an assoc. To have a look at availables options,
  * see the constructor of the Cache_Lite class in 'Cache_Lite.php'
  *
  * Comparing to Cache_Lite constructor, there is another option :
  * $options = array(
  *     (...) see Cache_Lite constructor
  *     'masterFile' => complete path of the file used for controlling the cache lifetime(string)
  * );
  *
  * @param array $options options
  * @access public
  */
 function __construct($options = array(NULL))
 {
     $options['lifetime'] = 0;
     parent::__construct($options);
     if (isset($options['masterFile'])) {
         $this->_masterFile = $options['masterFile'];
     } else {
         return $this->raiseError('Cache_Lite_File : masterFile option must be set !');
     }
     if (!($this->_masterFile_mtime = @filemtime($this->_masterFile))) {
         return $this->raiseError('Cache_Lite_File : Unable to read masterFile : ' . $this->_masterFile, -3);
     }
 }
开发者ID:pear,项目名称:cache_lite,代码行数:28,代码来源:File.php

示例5: array

 /**
  * Constructor
  *
  * $options is an assoc. To have a look at availables options,
  * see the constructor of the Cache_Lite class in 'Cache_Lite.php'
  *
  * @param array $options options
  * @access public
  */
 function __construct($options = array(NULL))
 {
     parent::__construct($options);
 }
开发者ID:corollarium,项目名称:cachearium,代码行数:13,代码来源:Timed.php

示例6:

 /**
  * Constructor
  *
  * $options is an assoc. To have a look at availables options,
  * see the constructor of the Cache_Lite class in 'Cache_Lite.php'
  *
  * @param array $options options
  * @access public
  */
 function __construct($options)
 {
     parent::__construct($options);
 }
开发者ID:Jaree,项目名称:revive-adserver,代码行数:13,代码来源:Output.php


注:本文中的Cache_Lite::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。