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
f9837f85
Commit
f9837f85
authored
May 30, 2012
by
Dave Marshall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to FileSessionHandler, NativeFileSessionHandler remove upstream
parent
e9af894a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
doc/providers/session.rst
doc/providers/session.rst
+2
-2
src/Silex/Provider/SessionServiceProvider.php
src/Silex/Provider/SessionServiceProvider.php
+2
-2
No files found.
doc/providers/session.rst
View file @
f9837f85
...
@@ -8,7 +8,7 @@ Parameters
...
@@ -8,7 +8,7 @@ Parameters
----------
----------
* **session.storage.save_path** (optional): The path for the
* **session.storage.save_path** (optional): The path for the
``
Native
FileSessionHandler``, defaults to the value of
``FileSessionHandler``, defaults to the value of
``sys_get_temp_dir()``.
``sys_get_temp_dir()``.
* **session.storage.options**: An array of options that is passed to the
* **session.storage.options**: An array of options that is passed to the
...
@@ -38,7 +38,7 @@ Services
...
@@ -38,7 +38,7 @@ Services
* **session.storage.handler**: A service that is used by the
* **session.storage.handler**: A service that is used by the
``session.storage`` for data access. Defaults to a
``session.storage`` for data access. Defaults to a
``
Native
FileSessionHandler`` storage handler.
``FileSessionHandler`` storage handler.
Registering
Registering
-----------
-----------
...
...
src/Silex/Provider/SessionServiceProvider.php
View file @
f9837f85
...
@@ -14,7 +14,7 @@ namespace Silex\Provider;
...
@@ -14,7 +14,7 @@ namespace Silex\Provider;
use
Silex\Application
;
use
Silex\Application
;
use
Silex\ServiceProviderInterface
;
use
Silex\ServiceProviderInterface
;
use
Symfony\Component\HttpFoundation\Session\Storage\Handler\
Native
FileSessionHandler
;
use
Symfony\Component\HttpFoundation\Session\Storage\Handler\FileSessionHandler
;
use
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage
;
use
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage
;
use
Symfony\Component\HttpFoundation\Session\Session
;
use
Symfony\Component\HttpFoundation\Session\Session
;
use
Symfony\Component\HttpKernel\KernelEvents
;
use
Symfony\Component\HttpKernel\KernelEvents
;
...
@@ -37,7 +37,7 @@ class SessionServiceProvider implements ServiceProviderInterface
...
@@ -37,7 +37,7 @@ class SessionServiceProvider implements ServiceProviderInterface
});
});
$app
[
'session.storage.handler'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
$app
[
'session.storage.handler'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
return
new
Native
FileSessionHandler
(
return
new
FileSessionHandler
(
isset
(
$app
[
'session.storage.save_path'
])
?
$app
[
'session.storage.save_path'
]
:
null
isset
(
$app
[
'session.storage.save_path'
])
?
$app
[
'session.storage.save_path'
]
:
null
);
);
});
});
...
...
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