public function SaveSessionListener::onKernelResponse in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/EventListener/SaveSessionListener.php \Symfony\Component\HttpKernel\EventListener\SaveSessionListener::onKernelResponse()
File
- vendor/
symfony/ http-kernel/ EventListener/ SaveSessionListener.php, line 47
Class
- SaveSessionListener
- Saves the session, in case it is still open, before sending the response/headers.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
public function onKernelResponse(FilterResponseEvent $event) {
if (!$event
->isMasterRequest()) {
return;
}
$session = $event
->getRequest()
->getSession();
if ($session && $session
->isStarted()) {
$session
->save();
}
}