You are here

public function WriteCheckSessionHandler::write in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php \Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler::write()

File

vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php, line 83

Class

WriteCheckSessionHandler
Wraps another SessionHandlerInterface to only write the session when it has been modified.

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

public function write($sessionId, $data) {
  if (isset($this->readSessions[$sessionId]) && $data === $this->readSessions[$sessionId]) {
    return true;
  }
  return $this->wrappedSessionHandler
    ->write($sessionId, $data);
}