public function NativeSessionStorage::save in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php \Symfony\Component\HttpFoundation\Session\Storage\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.
Throws
\RuntimeException If the session is saved without being started, or if the session is already closed.
Overrides SessionStorageInterface::save
1 call to NativeSessionStorage::save()
- SessionManager::save in core/
lib/ Drupal/ Core/ Session/ SessionManager.php - Force the session to be saved and closed.
1 method overrides NativeSessionStorage::save()
- SessionManager::save in core/
lib/ Drupal/ Core/ Session/ SessionManager.php - Force the session to be saved and closed.
File
- vendor/
symfony/ http-foundation/ Session/ Storage/ NativeSessionStorage.php, line 228
Class
- NativeSessionStorage
- This provides a base class for session attribute storage.
Namespace
Symfony\Component\HttpFoundation\Session\StorageCode
public function save() {
session_write_close();
if (!$this->saveHandler
->isWrapper() && !$this->saveHandler
->isSessionHandlerInterface()) {
// This condition matches only PHP 5.3 with internal save handlers
$this->saveHandler
->setActive(false);
}
$this->closed = true;
$this->started = false;
}