public function NativeSessionStorage::save

Force the session to be saved and closed.

This method must invoke session_write_close() unless this interface is used for a storage object design for unit or functional testing where a real PHP session would interfere with testing, in which case it it should actually persist the session data if required.

Overrides SessionStorageInterface::save

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php, line 214

Class

NativeSessionStorage
This provides a base class for session attribute storage.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function save() {
  session_write_close();
  if (!$this->saveHandler
    ->isWrapper() && !$this
    ->getSaveHandler()
    ->isSessionHandlerInterface()) {
    $this->saveHandler
      ->setActive(false);
  }
  $this->closed = true;
}