function MockFileSessionStorage::read
Reads session from storage and loads session.
1 call to MockFileSessionStorage::read()
- MockFileSessionStorage::start in vendor/
symfony/ http-foundation/ Session/ Storage/ MockFileSessionStorage.php - Starts the session.
File
-
vendor/
symfony/ http-foundation/ Session/ Storage/ MockFileSessionStorage.php, line 136
Class
- MockFileSessionStorage
- MockFileSessionStorage is used to mock sessions for functional testing where you may need to persist session data across separate PHP processes.
Namespace
Symfony\Component\HttpFoundation\Session\StorageCode
private function read() : void {
set_error_handler(static function () {
});
try {
$data = file_get_contents($this->getFilePath());
} finally {
restore_error_handler();
}
$this->data = $data ? unserialize($data) : [];
$this->loadSession();
}