-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Session Configuration] add clarifying notes on session save handler proxies #3423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
weaverryan
merged 2 commits into
symfony:2.3
from
cordoval:2889-explain-what-a-session-save-handler-proxy-is
Jan 9, 2014
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,13 @@ PHP or provided by PHP extensions, such as PHP-Sqlite, PHP-Memcached and so on. | |
All native save handlers are internal to PHP and as such, have no public facing API. | ||
They must be configured by ``php.ini`` directives, usually ``session.save_path`` and | ||
potentially other driver specific directives. Specific details can be found in | ||
docblock of the ``setOptions()`` method of each class. | ||
the docblock of the ``setOptions()`` method of each class. For an example of this for | ||
a save handler provided via the Memcached extension is | ||
`php.net/manual/en/memcached.setoption`_ | ||
|
||
While native save handlers can be activated by directly using | ||
``ini_set('session.save_handler', $name);``, Symfony2 provides a convenient way to | ||
activate these in the same way as custom handlers. | ||
activate these in the same way as it does for custom handlers. | ||
|
||
Symfony2 provides drivers for the following native save handler as an example: | ||
|
||
|
@@ -61,7 +63,7 @@ Example usage:: | |
Custom Save Handlers | ||
-------------------- | ||
|
||
Custom handlers are those which completely replace PHP's built in session save | ||
Custom handlers are those which completely replace PHP's built-in session save | ||
handlers by providing six callback functions which PHP calls internally at | ||
various points in the session workflow. | ||
|
||
|
@@ -234,6 +236,11 @@ PHP 5.4 functionality if it is available. | |
Save Handler Proxy | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
A Save Handler Proxy is basically a wrapper around a Save Handler that was | ||
introduced to support seamlessly the migration from PHP 5.3 to PHP 5.4+. It | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to seamlessly support |
||
further creates an extension point from where custom logic can be added that | ||
works independently of which handler is being wrapped inside. | ||
|
||
There are two kinds of save handler class proxies which inherit from | ||
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractProxy`: | ||
they are :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeProxy` | ||
|
@@ -263,3 +270,4 @@ without knowledge of the specific save handler. | |
|
||
.. _`php.net/session.customhandler`: http://php.net/session.customhandler | ||
.. _`php.net/session.configuration`: http://php.net/session.configuration | ||
.. _`php.net/manual/en/memcached.setoption`: http://php.net/manual/en/memcached.setoption | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use http://php.net/memcached.setoption |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example of a save handler provided via the Memcached extension can be found on `php.net`_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My proposal was wrong, I suggest:
For instance, the one provided by the Memcached extension can be found on `php.net/memcached.setoption`_