Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SessionStorageInterface.php

function SessionStorageInterface::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 should actually persist the session data if required.

Throws

\RuntimeException if the session is saved without being started, or if the session is already closed

2 methods override SessionStorageInterface::save()
MockArraySessionStorage::save in vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
Force the session to be saved and closed.
NativeSessionStorage::save in vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
Force the session to be saved and closed.

File

vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php, line 96

Class

SessionStorageInterface
StorageInterface.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function save() : void;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal