File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
components/http_foundation Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,17 @@ While native save handlers can be activated by directly using
35
35
``ini_set('session.save_handler', $name); ``, Symfony2 provides a convenient way to
36
36
activate these in the same way as custom handlers.
37
37
38
- Symfony2 provides drivers for the following native save handlers :
38
+ Symfony2 provides drivers for the following native save handler as an example :
39
39
40
40
* :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ Handler\\ NativeFileSessionHandler `
41
- * :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ Handler\\ NativeSqliteSessionHandler `
42
- * :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ Handler\\ NativeMemcacheSessionHandler `
43
- * :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ Handler\\ NativeMemcachedSessionHandler `
44
- * :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ Handler\\ NativeRedisSessionHandler `
45
41
46
42
Example usage::
47
43
48
44
use Symfony\Component\HttpFoundation\Session\Session;
49
45
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
50
- use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeMemcachedSessionHandler ;
46
+ use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler ;
51
47
52
- $storage = new NativeSessionStorage(array(), new NativeMemcachedSessionHandler ());
48
+ $storage = new NativeSessionStorage(array(), new NativeFileSessionHandler ());
53
49
$session = new Session($storage);
54
50
55
51
.. note ::
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ Quick example::
42
42
``session_id() ``, ``session_name() ``, and ``session_destroy() `` and instead
43
43
use the APIs in the following section.
44
44
45
+ .. note ::
46
+
47
+ While it is recommended to explicitly start a session, a sessions will actually
48
+ start on demand, that is, if any session request is made to read/write session
49
+ data.
50
+
45
51
.. warning ::
46
52
47
53
Symfony sessions are incompatible with PHP ini directive ``session.auto_start = 1 ``
You can’t perform that action at this time.
0 commit comments