Class SessionHandler_pgsql

Description

PostgreSQL Session Handler for PHP (native).

Copyright 1999-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.

Required parameters:

   'database' - (string) The name of the database.
   'password' - (string) The password associated with 'username'.
   'protocol' - (string) The communication protocol ('tcp', 'unix').
   'username' - (string) The username with which to connect to the database.

 Required for some configurations (i.e. 'protocol' = 'tcp'):
   'hostspec' - (string) The hostname of the database server.
   'port'     - (integer) The port on which to connect to the database.

Optional parameters:

   'persistent' - (boolean) Use persistent DB connections?
                  Default: NO
   'table'      - (string) The name of the sessiondata table in 'database'.
                  Default: 'horde_sessionhandler'
</pre> The table structure for the SessionHandler can be found in horde/scripts/sql/horde_sessionhandler.pgsql.sql.

Contributors:

  Jason Carlson           Return an empty string on failed reads
  pat@pcprogrammer.com    Perform update in a single transaction
  Jonathan Crompton       Lock row for life of session

$Horde: framework/SessionHandler/SessionHandler/pgsql.php,v 1.12.10.22 2009/09/25 14:29:09 jan Exp $

Located in /SessionHandler/SessionHandler/pgsql.php (line 41)

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

Handle for the current database connection.

Inherited Variables

Inherited from SessionHandler

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

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

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

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:20:35 +0000 by phpDocumentor 1.4.3