Class SessionHandler_mysql

Description

SessionHandler:: implementation for MySQL (native).

Required parameters:

   '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.
   'table'      - (string) The name of the sessiondata table in 'database'.
   'rowlocking' - (boolean) Whether to use row-level locking and
                  transactions (InnoDB) or table-level locking (MyISAM).

Required for some configurations:

   'port' - (integer) The port on which to connect to the database.

Optional parameters:

   'persistent' - (boolean) Use persistent DB connections?

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

$Horde: framework/SessionHandler/SessionHandler/mysql.php,v 1.16.12.23 2009/09/25 14:29:09 jan 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/mysql.php (line 40)

SessionHandler
   |
   --SessionHandler_mysql
Variable Summary
 resource $_db
Method Summary
 boolean destroy (string $id)
 boolean gc ([integer $maxlifetime = 300])
 array getSessionIDs ()
Variables
resource $_db (line 47)

Handle for the current database connection.

Inherited Variables

Inherited from SessionHandler

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

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 243)

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 273)

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:19:55 +0000 by phpDocumentor 1.4.3