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


PHP JCacheStorage::__construct方法代碼示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   11.1
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (self::$_db === null) {
         $this->getConnection();
     }
 }
開發者ID:ZerGabriel,項目名稱:joomla-platform,代碼行數:14,代碼來源:memcache.php

示例2: __construct

 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   3.4
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (static::$_redis === null) {
         $this->getConnection();
     }
 }
開發者ID:eshiol,項目名稱:joomla-cms,代碼行數:14,代碼來源:redis.php

示例3: array

 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "The memcache extension is not available");
     }
     parent::__construct($options);
     $config =& JFactory::getConfig();
     $params = $config->getValue('config.memcache_settings');
     if (!is_array($params)) {
         $params = unserialize(stripslashes($params));
     }
     if (!$params) {
         $params = array();
     }
     $this->_compress = isset($params['compression']) ? $params['compression'] : 0;
     $this->_persistent = isset($params['persistent']) ? $params['persistent'] : false;
     // This will be an array of loveliness
     $this->_servers = isset($params['servers']) ? $params['servers'] : array();
     // Create the memcache connection
     $this->_db = new Memcache();
     for ($i = 0, $n = count($this->_servers); $i < $n; $i++) {
         $server = $this->_servers[$i];
         $this->_db->addServer($server['host'], $server['port'], $this->_persistent);
     }
     // Get the site hash
     $this->_hash = $config->getValue('config.secret');
 }
開發者ID:Fellah,項目名稱:govnobaki,代碼行數:33,代碼來源:memcache.php

示例4: __construct

 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   12.1
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (static::isSupported() && static::$_db === null) {
         $this->getConnection();
     }
 }
開發者ID:kshitijSharma2014,項目名稱:joomla-cms,代碼行數:14,代碼來源:memcached.php

示例5: array

 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     parent::__construct($options);
     $config =& JFactory::getConfig();
     $this->_root = $options['cachebase'];
     $this->_hash = $config->getValue('config.secret');
 }
開發者ID:joebushi,項目名稱:joomla,代碼行數:13,代碼來源:file.php

示例6: array

	/**
	 * Constructor
	 *
	 * @param array $options optional parameters
	 */
	function __construct( $options = array() )
	{
		parent::__construct($options);

		$config			=& JFactory::getConfig();
		$this->_hash	= $config->get('secret');
	}
開發者ID:realityking,項目名稱:JAJAX,代碼行數:12,代碼來源:JCacheStorageMock.php

示例7: __construct

 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   11.1
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->_compress = JFactory::getConfig()->get('memcache_compress', false) ? MEMCACHE_COMPRESSED : 0;
     if (static::$_db === null) {
         $this->getConnection();
     }
 }
開發者ID:joomla-projects,項目名稱:media-manager-improvement,代碼行數:15,代碼來源:memcache.php

示例8: __construct

 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   11.1
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->_root = $options['cachebase'];
     $cloptions = array('cacheDir' => $this->_root . '/', 'lifeTime' => $this->_lifetime, 'fileLocking' => $this->_locking, 'automaticCleaningFactor' => isset($options['autoclean']) ? $options['autoclean'] : 200, 'fileNameProtection' => false, 'hashedDirectoryLevel' => 0, 'caching' => $options['caching']);
     if (self::$CacheLiteInstance === null) {
         $this->initCache($cloptions);
     }
 }
開發者ID:RuDers,項目名稱:JoomlaSQL,代碼行數:16,代碼來源:cachelite.php

示例9: array

 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "The memcache extension is not available");
     }
     parent::__construct($options);
     $params =& JCacheStorageMemcache::getConfig();
     $this->_compress = isset($params['compression']) ? $params['compression'] : 0;
     $this->_db =& JCacheStorageMemcache::getConnection();
     // Get the site hash
     $this->_hash = $params['hash'];
 }
開發者ID:stonyyi,項目名稱:anahita,代碼行數:18,代碼來源:memcache.php

示例10: array

 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "The memcache extension is not available");
     }
     parent::__construct($options);
     $params =& JCacheStorageMemcache::getConfig();
     $this->_compress = isset($params['compression']) ? $params['compression'] : 0;
     $this->_db =& JCacheStorageMemcache::getConnection();
     // memcahed has no list keys, we do our own accounting, initalise key index
     if ($this->_db->get($this->_hash . '-index') === false) {
         $empty = array();
         $this->_db->set($this->_hash . '-index', $empty, $this->_compress, 0);
     }
 }
開發者ID:JSWebdesign,項目名稱:intranet-platform,代碼行數:21,代碼來源:memcache.php

示例11: __construct

 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters
  *
  * @since   11.1
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->_root = $options['cachebase'];
 }
開發者ID:RuDers,項目名稱:JoomlaSQL,代碼行數:12,代碼來源:file.php

示例12: __construct

 /**
  * Constructor
  *
  * @param   array    $options optional parameters
  * 
  * @since   11.1
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
 }
開發者ID:nibra,項目名稱:joomla-platform,代碼行數:11,代碼來源:wincache.php

示例13: array

 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     parent::__construct($options);
     $this->_root = $options['cachebase'] . DS . $this->_site;
 }
開發者ID:JSWebdesign,項目名稱:intranet-platform,代碼行數:11,代碼來源:file.php

示例14: __construct

 /**
  * Constructor.
  *
  * @param array          $options
  * @param RuntimeStorage $runtime
  */
 public function __construct($options = array(), RuntimeStorage $runtime = null)
 {
     $this->runtime = $runtime ?: new RuntimeStorage();
     parent::__construct($options);
 }
開發者ID:beingsane,項目名稱:quickcontent,代碼行數:11,代碼來源:runtime.php

示例15: __construct

 /**
  * Constructor.
  *
  * @param array    $options
  * @param JSession $session
  */
 public function __construct($options = array(), JSession $session = null)
 {
     $this->session = $session ?: JFactory::getSession();
     parent::__construct($options);
 }
開發者ID:lyrasoft,項目名稱:lyrasoft.github.io,代碼行數:11,代碼來源:session.php


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