Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
c8bed975
Commit
c8bed975
authored
Mar 27, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made session storage configurable
parent
e92c002a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/Silex/Extension/SessionExtension.php
src/Silex/Extension/SessionExtension.php
+5
-3
No files found.
src/Silex/Extension/SessionExtension.php
View file @
c8bed975
...
...
@@ -26,14 +26,16 @@ class SessionExtension implements ExtensionInterface
$this
->
app
=
$app
;
$app
[
'session'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
return
new
Session
(
$app
[
'session
_
storage'
]);
return
new
Session
(
$app
[
'session
.
storage'
]);
});
$app
[
'session
_storage'
]
=
$app
->
share
(
function
(
)
{
return
new
NativeSessionStorage
();
$app
[
'session
.storage'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
return
new
NativeSessionStorage
(
$app
[
'session.storage.options'
]
);
});
$app
[
'dispatcher'
]
->
addListener
(
HttpKernelEvents
::
onCoreRequest
,
$this
,
-
255
);
$app
[
'session.storage.options'
]
=
array
();
}
public
function
onCoreRequest
(
$event
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment