@@ -223,21 +223,21 @@ Session start-on-demand
223
223
.. versionadded :: 2.3
224
224
Control over session "start-on-demand" was added in Symfony 2.3.
225
225
226
- In versions 2.1-2.2, Symfony Sessions automatically invoked `$session->start() ` when
226
+ In versions 2.1-2.2, Symfony Sessions automatically invoked `` $session->start() ` ` when
227
227
any attempt was made to access session data (effectively 'start on demand').
228
228
From Symfony 2.3 this behaviour can be controlled.
229
229
230
230
There are three modes defined by :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ SessionStorageInterface `
231
231
232
232
The settings are as follows:
233
233
234
- - `SessionStorageInterface::NO_START_ON_DEMAND_STRICT ` - The session will not be started on demand
235
- and any attempt to read or write session data will result in a `\RuntimeException `
236
- - `SessionStorageInterface::START_ON_DEMAND ` - The session will be started if it hasn't already been
234
+ - `` SessionStorageInterface::NO_START_ON_DEMAND_STRICT ` ` - The session will not be started on demand
235
+ and any attempt to read or write session data will result in a `` \RuntimeException ` `
236
+ - `` SessionStorageInterface::START_ON_DEMAND ` ` - The session will be started if it hasn't already been
237
237
when any attempt is made to read ro write session data.
238
- - `SessionStorageInterface::NO_START_ON_DEMAND_LAX ` - The sessions will not be started on demand
239
- when session data is read or written to. It will allow access to the unitialized `BagInterface `.
240
- If this session is subsequently started manually after data is written to a `BagInterface ` will
238
+ - `` SessionStorageInterface::NO_START_ON_DEMAND_LAX ` ` - The sessions will not be started on demand
239
+ when session data is read or written to. It will allow access to the unitialized `` BagInterface ` `.
240
+ If this session is subsequently started manually after data is written to a `` BagInterface ` ` will
241
241
be overwritten (by the session data read from persistence).
242
242
243
243
You can configure these by injecting a configured storage engine into the session::
0 commit comments