/** * Constructor * * @param array $options Optional parameters. * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); if (self::$_db === null) { $this->getConnection(); } }
/** * Constructor * * @param array $options Optional parameters. * * @since 3.4 */ public function __construct($options = array()) { parent::__construct($options); if (static::$_redis === null) { $this->getConnection(); } }
/** * 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'); }
/** * 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(); } }
/** * 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'); }
/** * Constructor * * @param array $options optional parameters */ function __construct( $options = array() ) { parent::__construct($options); $config =& JFactory::getConfig(); $this->_hash = $config->get('secret'); }
/** * 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(); } }
/** * 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); } }
/** * 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']; }
/** * 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']; }
/** * 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); } }
/** * Constructor * * @param array $options Optional parameters * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); $this->_root = $options['cachebase']; }
/** * Constructor * * @param array $options optional parameters * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); }
/** * Constructor * * @access protected * @param array $options optional parameters */ function __construct($options = array()) { parent::__construct($options); $this->_root = $options['cachebase'] . DS . $this->_site; }
/** * Constructor. * * @param array $options * @param RuntimeStorage $runtime */ public function __construct($options = array(), RuntimeStorage $runtime = null) { $this->runtime = $runtime ?: new RuntimeStorage(); parent::__construct($options); }
/** * Constructor. * * @param array $options * @param JSession $session */ public function __construct($options = array(), JSession $session = null) { $this->session = $session ?: JFactory::getSession(); parent::__construct($options); }