本文整理汇总了PHP中JSessionStorage::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JSessionStorage::__construct方法的具体用法?PHP JSessionStorage::__construct怎么用?PHP JSessionStorage::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSessionStorage
的用法示例。
在下文中一共展示了JSessionStorage::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* 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);
}
示例2: __construct
/**
* 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);
}
示例3: __construct
/**
* 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);
}
示例4: __construct
/**
* 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();
}
示例5: __construct
/**
* 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)));
}
示例6: __construct
/**
* 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)));
}
示例7: __construct
/**
* 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);
}
示例8: array
/**
* 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();
}