wrappedSessionHandler = $wrapped_session_handler; $this->sessionWritable = $session_writable; } /** * {@inheritdoc} */ public function close() { return $this->wrappedSessionHandler->close(); } /** * {@inheritdoc} */ public function destroy($session_id) { return $this->wrappedSessionHandler->destroy($session_id); } /** * {@inheritdoc} */ public function gc($max_lifetime) { return $this->wrappedSessionHandler->gc($max_lifetime); } /** * {@inheritdoc} */ public function open($save_path, $session_id) { return $this->wrappedSessionHandler->open($save_path, $session_id); } /** * {@inheritdoc} */ public function read($session_id) { return $this->wrappedSessionHandler->read($session_id); } /** * {@inheritdoc} */ public function write($session_id, $session_data) { if ($this->isSessionWritable()) { return $this->wrappedSessionHandler->write($session_id, $session_data); } else { return TRUE; } } /** * {@inheritdoc} */ public function setSessionWritable($flag) { $this->sessionWritable = (bool) $flag; } /** * {@inheritdoc} */ public function isSessionWritable() { return $this->sessionWritable; } }