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


PHP vB_Cache::__construct方法代碼示例

本文整理匯總了PHP中vB_Cache::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP vB_Cache::__construct方法的具體用法?PHP vB_Cache::__construct怎麽用?PHP vB_Cache::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vB_Cache的用法示例。


在下文中一共展示了vB_Cache::__construct方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor protected to enforce singleton use.
  * @see instance()
  */
 protected function __construct($cachetype)
 {
     parent::__construct($cachetype);
     //get the APC prefix.
     $config = vB::getConfig();
     if (empty($config['Cache']['apcprefix'])) {
         $this->prefix = $config['Database']['tableprefix'];
     } else {
         $this->prefix = $config['Cache']['apcprefix'];
     }
 }
開發者ID:cedwards-reisys,項目名稱:nexus-web,代碼行數:15,代碼來源:apc.php

示例2: __construct

 /**
  * Constructor public to allow for separate automated unit testing. Actual code should use
  * vB_Cache::instance();
  * @see vB_Cache::instance()
  */
 public function __construct($cachetype)
 {
     parent::__construct($cachetype);
     $this->requestStart = vB::getRequest()->getTimeNow();
     $config = vB::getConfig();
     $this->cachetype = $cachetype;
     if (!isset($config['Cache']['fileCachePath'])) {
         throw new vB_Exception_Cache('need_filecache_location');
     }
     $this->cacheLocation = $config['Cache']['fileCachePath'];
     if (!is_dir($this->cacheLocation) or !is_writable($this->cacheLocation)) {
         throw new vB_Exception_Cache('invalid_filecache_location- ' . $this->cacheLocation);
     }
 }
開發者ID:cedwards-reisys,項目名稱:nexus-web,代碼行數:19,代碼來源:filesystem.php

示例3: __construct

 /**
  * Constructor protected to enforce singleton use.
  * @see instance()
  */
 protected function __construct($cachetype)
 {
     parent::__construct($cachetype);
     $this->memcached = vB_Memcache::instance();
     $check = $this->memcached->connect();
     if ($check === 3) {
         trigger_error('Unable to connect to memcache server', E_USER_ERROR);
     }
     $this->expiration = 48 * 60 * 60;
     // two days
     $this->timeNow = vB::getRequest()->getTimeNow();
     //get the memcache prefix.
     $config = vB::getConfig();
     if (empty($config['Cache']['memcacheprefix'])) {
         $this->prefix = $config['Database']['tableprefix'];
     } else {
         $this->prefix = $config['Cache']['memcacheprefix'];
     }
 }
開發者ID:cedwards-reisys,項目名稱:nexus-web,代碼行數:23,代碼來源:memcached.php

示例4: __construct

 /**
  * Constructor public to allow for separate automated unit testing. Actual code should use
  * vB_Cache::instance();
  * @see vB_Cache::instance()
  */
 public function __construct($cachetype)
 {
     parent::__construct($cachetype);
     $this->cachetype = $cachetype;
 }
開發者ID:cedwards-reisys,項目名稱:nexus-web,代碼行數:10,代碼來源:memory.php

示例5: __construct

 /**
  * Constructor public to allow for separate automated unit testing. Actual code should use
  * vB_Cache::instance();
  * @see vB_Cache::instance()
  */
 public function __construct($cachetype)
 {
     parent::__construct($cachetype);
     $this->assertor = vB::getDbAssertor();
     $this->requestStart = $this->timeNow;
 }
開發者ID:cedwards-reisys,項目名稱:nexus-web,代碼行數:11,代碼來源:db.php


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