AbstractSessionListener
in package
implements
EventSubscriberInterface, ResetInterface
Sets the session onto the request on the "kernel.request" event and saves it on the "kernel.response" event.
In addition, if the session has been started it overrides the Cache-Control header in such a way that all caching is disabled in that case. If you have a scenario where caching responses with session information in them makes sense, you can disable this behaviour by setting the header AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER on the response.
Tags
Interfaces, Classes and Traits
- EventSubscriberInterface
- An EventSubscriber knows itself what events it is interested in.
- ResetInterface
- Provides a way to reset an object to its initial state.
Table of Contents
- NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'
- $debug : mixed
- $sessionOptions : array<string, mixed>
- $sessionUsageStack : mixed
- getSessionOptions() : array<string|int, mixed>
Constants
NO_AUTO_CACHE_CONTROL_HEADER
public
mixed
NO_AUTO_CACHE_CONTROL_HEADER
= 'Symfony-Session-NoAutoCacheControl'
Properties
$debug
private
mixed
$debug
$sessionOptions
private
array<string, mixed>
$sessionOptions
$sessionUsageStack
private
mixed
$sessionUsageStack
= []
Methods
getSessionOptions()
private
getSessionOptions(array<string|int, mixed> $sessionOptions) : array<string|int, mixed>
Parameters
- $sessionOptions : array<string|int, mixed>