The Horde_Lock_sql driver implements a storage backend for the Horde_Lock API
Required parameters:
'phptype' The database type (ie. 'pgsql', 'mysql', etc.).
Required by some database implementations:
'database' The name of the database. 'hostspec' The hostname of the database server. 'username' The username with which to connect to the database. 'password' The password associated with 'username'. 'options' Additional options to pass to the database. 'tty' The TTY on which to connect to the database. 'port' The port on which to connect to the database.
Optional parameters:
'table' The name of the lock table in 'database'. Defaults to 'horde_locks'. 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 containing the parameters which are different for the read database connection, currently supported only 'hostspec' and 'port' parameters.The table structure for the locks is as follows:
CREATE TABLE horde_locks ( lock_id VARCHAR(36) NOT NULL, lock_owner VARCHAR(32) NOT NULL, lock_scope VARCHAR(32) NOT NULL, lock_principal VARCHAR(255) NOT NULL, lock_origin_timestamp BIGINT NOT NULL, lock_update_timestamp BIGINT NOT NULL, lock_expiry_timestamp BIGINT NOT NULL, lock_type TINYINT NOT NULL, PRIMARY KEY (lock_id) );Copyright 2008-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://opensource.org/licenses/lgpl-license.php.
$Horde: framework/Lock/Lock/sql.php,v 1.8.2.8 2009/02/25 05:35:42 chuck Exp $
Located in /Lock/Lock/sql.php (line 56)
Horde_Lock | --Horde_Lock_sql
Boolean indicating whether or not we're connected to the SQL server.
Handle for the current database connection.
Handle for the current database connection, used for writing. Defaults to the same handle as $_db if a separate write database isn't required.
Inherited from Horde_Lock
Horde_Lock::$_params
Constructs a new Horde_Lock_sql object.
Removes a lock given the lock ID.
NOTE: No security checks are done in the Horde_Lock API. It is expected that the calling application has done all necessary security checks before requesting a lock be cleared.
Return an array of information about the requested lock.
Return a list of valid locks with the option to limit the results by principal, scope and/or type.
Extend the valid lifetime of a valid lock to now + $newtimeout.
Sets a lock on the requested principal and returns the generated lock ID.
NOTE: No security checks are done in the Horde_Lock API. It is expected that the calling application has done all necessary security checks before requesting a lock be granted.
Opens a connection to the SQL server.
Inherited From Horde_Lock
Horde_Lock::Horde_Lock()
Horde_Lock::clearLock()
Horde_Lock::factory()
Horde_Lock::getLockInfo()
Horde_Lock::getLocks()
Horde_Lock::resetLock()
Horde_Lock::setLock()
Horde_Lock::singleton()
Horde_Lock::_uuidgen()
Documentation generated on Sun, 30 Jan 2011 05:22:02 +0000 by phpDocumentor 1.4.3