symfony API

sfPDOSessionStorage Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.2 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

Provides support for session storage using a PDO database abstraction layer.

Inheritence

sfPDOSessionStorage  <  sfDatabaseSessionStorage < sfSessionStorage < sfStorage

Method Summary

Methods inherited from sfDatabaseSessionStorage

initialize , regenerate , sessionClose , sessionDestroy , sessionGC , sessionOpen , sessionRead , sessionWrite , shutdown

Methods inherited from sfSessionStorage

initialize , read , regenerate , remove , shutdown , write

Methods inherited from sfStorage

getOptions , initialize , read , regenerate , remove , shutdown , write , __construct

Method Details

  • (bool) sessionDestroy ($id) Browse code

    $id A session ID

    Destroys a session.

    returns true, if the session was destroyed, otherwise an exception is thrown

    throws DatabaseException If the session cannot be destroyed

  • (bool) sessionGC ($lifetime) Browse code

    $lifetime The lifetime of a session

    Cleans up old sessions.

    returns true, if old sessions have been cleaned, otherwise an exception is thrown

    throws DatabaseException If any old sessions cannot be cleaned

  • (string) sessionRead ($id) Browse code

    $id A session ID

    Reads a session.

    returns The session data if the session was read or created, otherwise an exception is thrown

    throws DatabaseException If the session cannot be read

  • (bool) sessionWrite ($id, $data) Browse code

    $id A session ID
    $data A serialized chunk of session data

    Writes session data.

    returns true, if the session was written, otherwise an exception is thrown

    throws DatabaseException If the session data cannot be written