function NativeSessionStorage::clear
Overrides SessionStorageInterface::clear
1 method overrides NativeSessionStorage::clear()
- PhpBridgeSessionStorage::clear in vendor/
symfony/ http-foundation/ Session/ Storage/ PhpBridgeSessionStorage.php - Clear all session data in memory.
File
-
vendor/
symfony/ http-foundation/ Session/ Storage/ NativeSessionStorage.php, line 250
Class
- NativeSessionStorage
- This provides a base class for session attribute storage.
Namespace
Symfony\Component\HttpFoundation\Session\StorageCode
public function clear() : void {
// clear out the bags
foreach ($this->bags as $bag) {
$bag->clear();
}
// clear out the session
$_SESSION = [];
// reconnect the bags to the session
$this->loadSession();
}