Skip to content

Commit 2888d00

Browse files
committed
answer some questions and clarify the best chapter imo from the symfony documentation
1 parent 0428c57 commit 2888d00

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

components/http_foundation/session_configuration.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ 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 an example of this for
32+
a save handler provided via the Memcached extension is
33+
`php.net/manual/en/memcached.setoption`_
3234

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

3739
Symfony2 provides drivers for the following native save handler as an example:
3840

@@ -61,7 +63,7 @@ Example usage::
6163
Custom Save Handlers
6264
--------------------
6365

64-
Custom handlers are those which completely replace PHP's built in session save
66+
Custom handlers are those which completely replace PHP's built-in session save
6567
handlers by providing six callback functions which PHP calls internally at
6668
various points in the session workflow.
6769

@@ -234,6 +236,11 @@ PHP 5.4 functionality if it is available.
234236
Save Handler Proxy
235237
~~~~~~~~~~~~~~~~~~
236238

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

264271
.. _`php.net/session.customhandler`: http://php.net/session.customhandler
265272
.. _`php.net/session.configuration`: http://php.net/session.configuration
273+
.. _`php.net/manual/en/memcached.setoption`: http://php.net/manual/en/memcached.setoption

0 commit comments

Comments
 (0)