コード例 #1
0
ファイル: Var.php プロジェクト: btweedy/foresmo
 /**
  * 
  * 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
0
ファイル: Adapter.php プロジェクト: agentile/foresmo
 /**
  * 
  * 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
0
ファイル: Adapter.php プロジェクト: btweedy/foresmo
 /**
  * 
  * 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
0
ファイル: Adapter.php プロジェクト: kalkin/jforg-dodb
 /**
  * Sets the $_type_safe and $_default_doc
  * 
  * @return void
  * @author Bahtiar Gadimov <*****@*****.**>
  */
 protected function _postConfig()
 {
     parent::_postConfig();
     $this->_default_doc = $this->_config['default_doc'];
     $this->_type_safe = $this->_config['type_safe'];
 }
コード例 #5
0
ファイル: Auth.php プロジェクト: kalkin/solarphp
 /**
  * 
  * 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']));
     }
 }