Skip to content

Commit 26a7b1b

Browse files
committed
bug symfony#3423 [Session Configuration] add clarifying notes on session save handler proxies (cordoval)
This PR was merged into the 2.3 branch. Discussion ---------- [Session Configuration] add clarifying notes on session save handler proxies | Q | A | | --- | --- | | Doc fix? | yes | | New docs? | no | | Applies to | 2.3+ | | Fixed tickets | symfony#2889 | | License | CC-ASA 3.0 Unported | Sent using [Gush](https://github.com/cordoval/gush) Commits ------- 771b862 address comments from @wouterj 2888d00 answer some questions and clarify the best chapter imo from the symfony documentation
2 parents 2be3f52 + 771b862 commit 26a7b1b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

components/http_foundation/session_configuration.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ PHP or provided by PHP extensions, such as PHP-Sqlite, PHP-Memcached and so on.
2828
All native save handlers are internal to PHP and as such, have no public facing API.
2929
They must be configured by ``php.ini`` directives, usually ``session.save_path`` and
3030
potentially other driver specific directives. Specific details can be found in
31-
docblock of the ``setOptions()`` method of each class.
31+
the docblock of the ``setOptions()`` method of each class. For instance, the one
32+
provided by the Memcached extension can be found on `php.net/memcached.setoption`_
3233

3334
While native save handlers can be activated by directly using
3435
``ini_set('session.save_handler', $name);``, Symfony2 provides a convenient way to
35-
activate these in the same way as custom handlers.
36+
activate these in the same way as it does for custom handlers.
3637

3738
Symfony2 provides drivers for the following native save handler as an example:
3839

@@ -61,7 +62,7 @@ Example usage::
6162
Custom Save Handlers
6263
--------------------
6364

64-
Custom handlers are those which completely replace PHP's built in session save
65+
Custom handlers are those which completely replace PHP's built-in session save
6566
handlers by providing six callback functions which PHP calls internally at
6667
various points in the session workflow.
6768

@@ -234,6 +235,11 @@ PHP 5.4 functionality if it is available.
234235
Save Handler Proxy
235236
~~~~~~~~~~~~~~~~~~
236237

238+
A Save Handler Proxy is basically a wrapper around a Save Handler that was
239+
introduced to support seamlessly the migration from PHP 5.3 to PHP 5.4+. It
240+
further creates an extension point from where custom logic can be added that
241+
works independently of which handler is being wrapped inside.
242+
237243
There are two kinds of save handler class proxies which inherit from
238244
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractProxy`:
239245
they are :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeProxy`
@@ -263,3 +269,4 @@ without knowledge of the specific save handler.
263269

264270
.. _`php.net/session.customhandler`: http://php.net/session.customhandler
265271
.. _`php.net/session.configuration`: http://php.net/session.configuration
272+
.. _`php.net/memcached.setoption`: http://php.net/memcached.setoption

0 commit comments

Comments
 (0)