本文整理汇总了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']));
}
}