24 private $wrappedSessionHandler;
29 private $readSessions;
31 public function __construct(\SessionHandlerInterface $wrappedSessionHandler)
33 $this->wrappedSessionHandler = $wrappedSessionHandler;
39 public function close()
41 return $this->wrappedSessionHandler->close();
47 public function destroy($sessionId)
49 return $this->wrappedSessionHandler->destroy($sessionId);
55 public function gc($maxlifetime)
57 return $this->wrappedSessionHandler->gc($maxlifetime);
63 public function open($savePath, $sessionName)
65 return $this->wrappedSessionHandler->open($savePath, $sessionName);
71 public function read($sessionId)
73 $session = $this->wrappedSessionHandler->read($sessionId);
75 $this->readSessions[$sessionId] = $session;
83 public function write($sessionId, $data)
85 if (isset($this->readSessions[$sessionId]) && $data === $this->readSessions[$sessionId]) {
89 return $this->wrappedSessionHandler->write($sessionId, $data);