Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "The apc extension is not available");
     }
     parent::__construct($options);
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   11.1
  */
 public function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, JText::_('JLIB_SESSION_EACCELERATOR_EXTENSION_NOT_AVAILABLE'));
     }
     parent::__construct($options);
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "THE_EACCELERATOR_EXTENSION_IS_NOT_AVAILABLE");
     }
     parent::__construct($options);
 }
Ejemplo n.º 4
0
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   11.1
  * @throws  RuntimeException
  */
 public function __construct($options = array())
 {
     if (!self::isSupported()) {
         throw new RuntimeException('Wincache Extension is not available', 404);
     }
     parent::__construct($options);
 }
Ejemplo n.º 5
0
	/**
	 * Constructor
	 *
	 * @param   array  $options  Optional parameters.
	 *
	 * @return  JSessionStorageMemcache
	 *
	 * @since   11.1
	 */
	public function __construct($options = array())
	{
		if (!$this->test())
		{
			return JError::raiseError(404, JText::_('JLIB_SESSION_MEMCACHE_EXTENSION_NOT_AVAILABLE'));
		}

		parent::__construct($options);

		$config = JFactory::getConfig();
		$params = $config->get('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();
	}
Ejemplo n.º 6
0
 /**
  * Constructor
  *
  * @param array $options Optional parameters.
  *
  * @since   11.1
  * @throws RuntimeException
  */
 public function __construct($options = array())
 {
     if (!self::isSupported()) {
         throw new RuntimeException('Memcache Extension is not available', 404);
     }
     parent::__construct($options);
     $config = JFactory::getConfig();
     // This will be an array of loveliness
     // @todo: multiple servers
     $this->_servers = array(array('host' => $config->get('memcache_server_host', 'localhost'), 'port' => $config->get('memcache_server_port', 11211)));
 }
Ejemplo n.º 7
0
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   11.1
  */
 public function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, JText::_('JLIB_SESSION_MEMCACHE_EXTENSION_NOT_AVAILABLE'));
     }
     parent::__construct($options);
     $config = JFactory::getConfig();
     $this->_compress = $config->get('memcache_compress', false) ? Memcached::OPT_COMPRESSION : false;
     $this->_persistent = $config->get('memcache_persist', true);
     // This will be an array of loveliness
     // @todo: multiple servers
     $this->_servers = array(array('host' => $config->get('memcache_server_host', 'localhost'), 'port' => $config->get('memcache_server_port', 11211)));
 }
Ejemplo n.º 8
0
 /**
  * Overload Constructor to do additional check
  * 
  * @param array $options [description]
  */
 public function __construct($options = array())
 {
     // run test
     if (!$this->test()) {
         return JError::raiseError(404, JText::_('JLIB_SESSION_REDIS_EXTENSION_NOT_AVAILABLE'));
     }
     // get site config
     $config = JFactory::getConfig();
     // get redis key prefixes
     $prefixes = $config->get('redis_key_prefix', array());
     // set session key
     $this->prefix = isset($prefixes['session']) ? $prefixes['session'] : 'session:';
     // parent construct
     parent::__construct($options);
 }
Ejemplo n.º 9
0
 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "The memcache extension isn't 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();
 }