Base.php in Session Proxy 7
File
lib/SessionProxy/Storage/Base.php
View source
<?php
abstract class SessionProxy_Storage_Base implements SessionProxy_Storage_Interface {
protected $options;
protected $isHttps;
protected $sessionName;
protected $sessionNameUnsecure;
protected $lastReadSessionId = NULL;
protected $lastReadValueHash = NULL;
protected $uid = NULL;
protected $uidHasChanged = FALSE;
protected function sessionDataSetHash($sessionId, $serializedData) {
$this->lastReadSessionId = $sessionId;
$this->lastReadValueHash = md5($serializedData);
}
protected function sessionDataHasChanged($sessionId, $serializedData) {
global $user;
return $this->uidHasChanged || $this->lastReadSessionId != $sessionId || md5($serializedData) != $this->lastReadValueHash || REQUEST_TIME - $user->timestamp > variable_get('session_write_interval', 180);
}
public function getSessionUid() {
return $this->uid;
}
public function setSessionUid($uid) {
$this->uidHasChanged = $this->uid != $uid;
$this->uid = $uid;
}
public function __construct(array $options = array()) {
global $is_https;
$this->sessionName = session_name();
$this->isHttps = $is_https;
$this->options = $options;
}
}