Skip to content

Update session docs #1565

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
merged 1 commit into from Jul 26, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions components/http_foundation/session_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,17 @@ 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.

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

* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler`
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSqliteSessionHandler`
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeMemcacheSessionHandler`
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeMemcachedSessionHandler`
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeRedisSessionHandler`

Example usage::

use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeMemcachedSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler;

$storage = new NativeSessionStorage(array(), new NativeMemcachedSessionHandler());
$storage = new NativeSessionStorage(array(), new NativeFileSessionHandler());
$session = new Session($storage);

.. note::
Expand Down
6 changes: 6 additions & 0 deletions components/http_foundation/sessions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Quick example::
``session_id()``, ``session_name()``, and ``session_destroy()`` and instead
use the APIs in the following section.

.. note::

While it is recommended to explicitly start a session, a sessions will actually
start on demand, that is, if any session request is made to read/write session
data.

.. warning::

Symfony sessions are incompatible with PHP ini directive ``session.auto_start = 1``
Expand Down