File tree Expand file tree Collapse file tree 2 files changed +9
-28
lines changed Expand file tree Collapse file tree 2 files changed +9
-28
lines changed Original file line number Diff line number Diff line change 5
5
Sessions
6
6
========
7
7
8
- Installation
9
- ------------
10
-
11
8
The Symfony HttpFoundation component has a very powerful and flexible session
12
9
subsystem which is designed to provide session management that you can use to
13
10
store information about the user between requests through a clear
14
11
object-oriented interface using a variety of session storage drivers.
15
12
16
- You need to install the HttpFoundation component to handle sessions:
17
-
18
- .. code-block :: terminal
19
-
20
- $ composer require symfony/http-foundation
21
-
22
13
Symfony sessions are designed to replace the usage of the ``$_SESSION `` super
23
14
global and native PHP functions related to manipulating the session like
24
15
``session_start() ``, ``session_regenerate_id() ``, ``session_id() ``,
@@ -28,6 +19,15 @@ global and native PHP functions related to manipulating the session like
28
19
29
20
Sessions are only started if you read or write from it.
30
21
22
+ Installation
23
+ ------------
24
+
25
+ You need to install the HttpFoundation component to handle sessions:
26
+
27
+ .. code-block :: terminal
28
+
29
+ $ composer require symfony/http-foundation
30
+
31
31
.. _session-intro :
32
32
33
33
Basic Usage
Original file line number Diff line number Diff line change @@ -194,25 +194,6 @@ code to production:
194
194
$twig->strictVariables(true);
195
195
};
196
196
197
- Another example for HTTP sessions:
198
-
199
- .. configuration-block ::
200
-
201
- .. code-block :: yaml
202
-
203
- when@test :
204
- framework :
205
- test : true
206
- session :
207
- storage_factory_id : session.storage.factory.mock_file
208
-
209
- .. code-block :: php-standalone
210
-
211
- use Symfony\Component\HttpFoundation\Session\Session;
212
- use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage;
213
-
214
- $session = new Session(new MockFileSessionStorage());
215
-
216
197
You can also use a different environment entirely, or override the default
217
198
debug mode (``true ``) by passing each as options to the ``bootKernel() ``
218
199
method::
You can’t perform that action at this time.
0 commit comments