本文整理匯總了PHP中Solar_Base::_postConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP Solar_Base::_postConfig方法的具體用法?PHP Solar_Base::_postConfig怎麽用?PHP Solar_Base::_postConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Solar_Base
的用法示例。
在下文中一共展示了Solar_Base::_postConfig方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _postConfig
/**
*
* Modifies $this->_config after it has been built.
*
* @return void
*
*/
protected function _postConfig()
{
parent::_postConfig();
if (empty($this->_config['output'])) {
$mode = PHP_SAPI == 'cli' ? 'text' : 'html';
$this->_config['output'] = $mode;
}
}
示例2: _postConfig
/**
*
* Modifies $this->_config after it has been built.
*
* @return void
*
*/
protected function _postConfig()
{
parent::_postConfig();
// check max life before garbage collection on server vs. idle time
$gc_maxlife = ini_get('session.gc_maxlifetime');
if ($gc_maxlife < $this->_config['idle']) {
throw $this->_exception('ERR_PHP_SESSION_IDLE', array('session.gc_maxlifetime' => $gc_maxlife, 'solar_auth_idle' => $this->_config['idle']));
}
// check life at client vs. exipire time;
// if life at client is zero, cookie never expires.
$cookie_life = ini_get('session.cookie_lifetime');
if ($cookie_life > 0 && $cookie_life < $this->_config['expire']) {
throw $this->_exception('ERR_PHP_SESSION_EXPIRE', array('session.cookie_lifetime' => $cookie_life, 'solar_auth_expire' => $this->_config['expire']));
}
// make sure we have process values
if (empty($this->_config['process_login'])) {
$this->_config['process_login'] = $this->locale('PROCESS_LOGIN');
}
if (empty($this->_config['process_logout'])) {
$this->_config['process_logout'] = $this->locale('PROCESS_LOGOUT');
}
// make sure the source is either 'get' or 'post'.
$is_get_or_post = $this->_config['source'] == 'get' || $this->_config['source'] == 'post';
if (!$is_get_or_post) {
// default to post
$this->_config['source'] = 'post';
}
}
示例3: _postConfig
/**
*
* Modifies $this->_config after it has been built.
*
* @return void
*
*/
protected function _postConfig()
{
parent::_postConfig();
// error if the configured expiry or idle times are longer than the
// PHP session.cache_expire value (convert minutes to seconds).
$php_expire = ini_get('session.cache_expire') * 60;
if ($this->_config['expire'] > $php_expire) {
throw $this->_exception('ERR_PHP_SESSION_CACHE_EXPIRE', array('session.cache_expire' => $php_expire, 'solar_auth_expire' => $this->_config['expire']));
}
// make sure we have process values
if (empty($this->_config['process_login'])) {
$this->_config['process_login'] = $this->locale('PROCESS_LOGIN');
}
if (empty($this->_config['process_logout'])) {
$this->_config['process_logout'] = $this->locale('PROCESS_LOGOUT');
}
// make sure the source is either 'get' or 'post'.
$is_get_or_post = $this->_config['source'] == 'get' || $this->_config['source'] == 'post';
if (!$is_get_or_post) {
// default to post
$this->_config['source'] = 'post';
}
}
示例4: _postConfig
/**
* Sets the $_type_safe and $_default_doc
*
* @return void
* @author Bahtiar Gadimov <bahtiar@gadimov.de>
*/
protected function _postConfig()
{
parent::_postConfig();
$this->_default_doc = $this->_config['default_doc'];
$this->_type_safe = $this->_config['type_safe'];
}
示例5: _postConfig
/**
*
* Modifies $this->_config after it has been built.
*
* @return void
*
*/
protected function _postConfig()
{
parent::_postConfig();
// check max life before garbage collection on server vs. idle time
$gc_maxlife = ini_get('session.gc_maxlifetime');
if ($gc_maxlife < $this->_config['idle']) {
throw $this->_exception('ERR_PHP_SESSION_IDLE', array('session.gc_maxlifetime' => $gc_maxlife, 'solar_auth_idle' => $this->_config['idle']));
}
// check life at client vs. exipire time;
// if life at client is zero, cookie never expires.
$cookie_life = ini_get('session.cookie_lifetime');
if ($cookie_life > 0 && $cookie_life < $this->_config['expire']) {
throw $this->_exception('ERR_PHP_SESSION_EXPIRE', array('session.cookie_lifetime' => $cookie_life, 'solar_auth_expire' => $this->_config['expire']));
}
}