示例#1
0
文件: cookie.php 项目: cruide/wasp
 public function __construct()
 {
     parent::__construct();
     if (self::$_saved === null) {
         self::$_saved = false;
     }
     if (self::$_need_save === null) {
         self::$_need_save = false;
     }
     $tmp = input()->cookie();
     if (array_count($tmp) > 0) {
         if (array_key_isset('PHPSESSID', $tmp)) {
             unset($tmp['PHPSESSID']);
         }
         if (array_count($tmp) > 0) {
             foreach ($tmp as $key => $val) {
                 if (is_varible_name($key)) {
                     if ($val != '') {
                         $this->_properties[$key] = unserialize(@gzuncompress(base64_decode($val)));
                     } else {
                         $this->_properties[$key] = '';
                     }
                 }
             }
         }
     }
     unset($tmp);
 }
示例#2
0
文件: session.php 项目: cruide/wasp
 public function __construct()
 {
     global $_SESSION;
     if (session_start()) {
         $this->sessionId = session_id();
     }
     parent::__construct($_SESSION);
 }