25 private $currentHandler;
26 private $writeOnlyHandler;
28 public function __construct(\SessionHandlerInterface $currentHandler, \SessionHandlerInterface $writeOnlyHandler)
30 if (!$currentHandler instanceof \SessionUpdateTimestampHandlerInterface) {
33 if (!$writeOnlyHandler instanceof \SessionUpdateTimestampHandlerInterface) {
37 $this->currentHandler = $currentHandler;
38 $this->writeOnlyHandler = $writeOnlyHandler;
46 $result = $this->currentHandler->close();
47 $this->writeOnlyHandler->close();
57 $result = $this->currentHandler->destroy($sessionId);
58 $this->writeOnlyHandler->destroy($sessionId);
66 public function gc($maxlifetime)
68 $result = $this->currentHandler->gc($maxlifetime);
69 $this->writeOnlyHandler->gc($maxlifetime);
77 public function open($savePath, $sessionName)
79 $result = $this->currentHandler->open($savePath, $sessionName);
80 $this->writeOnlyHandler->open($savePath, $sessionName);
88 public function read($sessionId)
91 return $this->currentHandler->read($sessionId);
97 public function write($sessionId, $sessionData)
99 $result = $this->currentHandler->write($sessionId, $sessionData);
100 $this->writeOnlyHandler->write($sessionId, $sessionData);
111 return $this->currentHandler->validateId($sessionId);
119 $result = $this->currentHandler->updateTimestamp($sessionId, $sessionData);
120 $this->writeOnlyHandler->updateTimestamp($sessionId, $sessionData);