Class SessionHandler_sql

Description

SessionHandler implementation for PHP's PEAR database abstraction layer.

Required parameters:

   'phptype'  - (string) The database type (e.g. 'pgsql', 'mysql', etc.).
   'hostspec' - (string) The hostname of the database server.
   'protocol' - (string) The communication protocol ('tcp', 'unix', etc.).
   'username' - (string) The username with which to connect to the database.
   'password' - (string) The password associated with 'username'.
   'database' - (string) The name of the database.
   'options'  - (array) Additional options to pass to the database.
   'tty'      - (string) The TTY on which to connect to the database.
   'port'     - (integer) The port on which to connect to the database.

Optional parameters:

   'table'      - (string) The name of the sessiondata table in 'database'.
   'persistent' - (boolean) Use persistent DB connections?

Optional values when using separate reading and writing servers, for example in replication settings:

   'splitread' - (boolean) Whether to implement the separation or not.
   'read'      - (array) Array containing the parameters which are
                 different for the writer database connection, currently
                 supports only 'hostspec' and 'port' parameters.

The table structure for the SessionHandler can be found in horde/scripts/sql/horde_sessionhandler.sql.

$Horde: framework/SessionHandler/SessionHandler/sql.php,v 1.22.10.20 2009/09/25 08:03:56 selsky Exp $

Copyright 2002-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /SessionHandler/SessionHandler/sql.php (line 52)

SessionHandler
   |
   --SessionHandler_sql
Direct descendents
Class Description
 class SessionHandler_sapdb SessionHandler implementation for PHP's PEAR database abstraction layer.
Variable Summary
Method Summary
 boolean destroy (string $id)
 boolean gc ([integer $maxlifetime = 300])
 array getSessionIDs ()
Variables
DB $_db (line 59)

Handle for the current database connection.

DB $_write_db (line 67)

Handle for the current database connection, used for writing. Defaults to the same handle as $_db if a separate write database is not required.

Inherited Variables

Inherited from SessionHandler

SessionHandler::$_connected
SessionHandler::$_force
SessionHandler::$_params
SessionHandler::$_sig
Methods
destroy (line 245)

Destroy the data for a particular session identifier in the SessionHandler backend.

  • return: True on success, false otherwise.
boolean destroy (string $id)
  • string $id: The session identifier.

Redefinition of:
SessionHandler::destroy()
Destroy the data for a particular session identifier in the SessionHandler backend.
gc (line 279)

Garbage collect stale sessions from the SessionHandler backend.

  • return: True on success, false otherwise.
boolean gc ([integer $maxlifetime = 300])
  • integer $maxlifetime: The maximum age of a session.

Redefinition of:
SessionHandler::gc()
Garbage collect stale sessions from the SessionHandler backend.
getSessionIDs (line 305)

Get a list of the valid session identifiers.

  • return: A list of valid session identifiers.
array getSessionIDs ()

Redefinition of:
SessionHandler::getSessionIDs()
Get a list of the valid session identifiers.

Inherited Methods

Inherited From SessionHandler

 SessionHandler::SessionHandler()
 SessionHandler::close()
 SessionHandler::countAuthenticatedUsers()
 SessionHandler::destroy()
 SessionHandler::factory()
 SessionHandler::gc()
 SessionHandler::getSessionIDs()
 SessionHandler::getSessionsInfo()
 SessionHandler::listAuthenticatedUsers()
 SessionHandler::open()
 SessionHandler::read()
 SessionHandler::singleton()
 SessionHandler::write()
 SessionHandler::__destruct()

Documentation generated on Sun, 30 Jan 2011 05:22:01 +0000 by phpDocumentor 1.4.3