public function MockArraySessionStorage::clear in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php \Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage::clear()
Clear all session data in memory.
Overrides SessionStorageInterface::clear
File
- vendor/
symfony/ http-foundation/ Session/ Storage/ MockArraySessionStorage.php, line 172
Class
- MockArraySessionStorage
- MockArraySessionStorage mocks the session for unit tests.
Namespace
Symfony\Component\HttpFoundation\Session\StorageCode
public function clear() {
// clear out the bags
foreach ($this->bags as $bag) {
$bag
->clear();
}
// clear out the session
$this->data = array();
// reconnect the bags to the session
$this
->loadSession();
}