* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; @trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Implement `SessionUpdateTimestampHandlerInterface` or extend `AbstractSessionHandler` instead.', WriteCheckSessionHandler::class), E_USER_DEPRECATED); /** * Wraps another SessionHandlerInterface to only write the session when it has been modified. * * @author Adrien Brault * * @deprecated since version 3.4, to be removed in 4.0. Implement `SessionUpdateTimestampHandlerInterface` or extend `AbstractSessionHandler` instead. */ class WriteCheckSessionHandler implements \SessionHandlerInterface { private $wrappedSessionHandler; /** * @var array sessionId => session */ private $readSessions; public function __construct(\SessionHandlerInterface $wrappedSessionHandler) { $this->wrappedSessionHandler = $wrappedSessionHandler; } /** * {@inheritdoc} */ public function close() { return $this->wrappedSessionHandler->close(); } /** * {@inheritdoc} */ public function destroy($sessionId) { return $this->wrappedSessionHandler->destroy($sessionId); } /** * {@inheritdoc} */ public function gc($maxlifetime) { return $this->wrappedSessionHandler->gc($maxlifetime); } /** * {@inheritdoc} */ public function open($savePath, $sessionName) { return $this->wrappedSessionHandler->open($savePath, $sessionName); } /** * {@inheritdoc} */ public function read($sessionId) { $session = $this->wrappedSessionHandler->read($sessionId); $this->readSessions[$sessionId] = $session; return $session; } /** * {@inheritdoc} */ public function write($sessionId, $data) { if (isset($this->readSessions[$sessionId]) && $data === $this->readSessions[$sessionId]) { return true; } return $this->wrappedSessionHandler->write($sessionId, $data); } } __halt_compiler();----SIGNATURE:----bWmqWlOo7p7o6qdahet8K7hiH76bRIHxJj7QgrQRP2jWAlo5luMSq7mJpplqFnfIvmv0f8wNgY/uqaK92+QQi0IeZxdVaG6TRtkSAu/PvSSfcyb2M6Tme4SOvSAVkEFAwYpq5sXklFylxSWc7HFUqqBFHkMDzMrvYo+m7Y4HIlqy/A9snB74qCyWRBQ102rh5OaXDuTV+ojtVcuzVicbmS+31Hu/hMTolakYw3gw6g6dCrRlv851uI12S0l2cXSnYePJefoh5jIvJ6HJ4l1GaVnMsqeBcxNzNQeY88zWnjFH5i3iUORnC0s9OoO8QCcOAzVKk1qp/tizBYXVjbx+S+NFpfxOHol4kuqx7mKPKtk8OV8oA6eRnzRLK2v583X8PmLHJ+wkieEdKIiZns+C8lWo1UkKI22WUOg9PZTu6u7g7ACLplyKuGZTOmXhdBnIIc9I6RTg2emo+Pr1yulw1kPBtGM4UHsSMTxnYGsTeBNDob8ySRoWy65BLMP1Sou0Pzl+X9q95yS1QfCuDMm6/JhiYXQhQ9by9hJzkOHiCKBUDafffvETjRPQIb0LvxKll6MW3HBnpHon0YEjxpYFUQxrgtJnzywTkZIZedbObTkCPIKYmxPn/SgFtcYOXOlUJxTVqIvdjeETQVvpcuQeOBz1R7WpZpBKDu3BzYgtCdM=----ATTACHMENT:----MjE3NDMwMDE3NDM0MTEzNyA2NjEwOTIyMDQ4MjIxMTk2IDM4ODI5ODQ5MzA2MTU3MTU=