PHP Class Horde_Lock_Mongo, horde

Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Lock
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_db MongoCollection The MongoDB Collection object for the cache data.
$_map array Ugly hack: lock driver written with assumption that it returns data as defined by SQL columns. So need to do mapping in this driver.

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) Constructor.
__destruct ( ) Destructor.
clearLock ( $lockid )
gc ( ) Do garbage collection needed for the driver.
getLockInfo ( $lockid )
getLocks ( $scope = null, $principal = null, $type = null )
resetLock ( $lockid, $lifetime )
setLock ( $requestor, $scope, $principal, $lifetime = 1, $type = Horde_Lock::TYPE_SHARED )

Méthodes protégées

Méthode Description
_mapFields ( $res ) : array Map return to SQL fields.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $params = [] )
$params array Parameters:
  - collection: (string) The collection name.
  - mongo_db: [REQUIRED] (Horde_Mongo_Client) A MongoDB client object.

__destruct() public méthode

Destructor.
public __destruct ( )

_mapFields() protected méthode

Map return to SQL fields.
protected _mapFields ( $res ) : array
Résultat array

clearLock() public méthode

public clearLock ( $lockid )

gc() public méthode

Do garbage collection needed for the driver.
public gc ( )

getLockInfo() public méthode

public getLockInfo ( $lockid )

getLocks() public méthode

public getLocks ( $scope = null, $principal = null, $type = null )

resetLock() public méthode

public resetLock ( $lockid, $lifetime )

setLock() public méthode

public setLock ( $requestor, $scope, $principal, $lifetime = 1, $type = Horde_Lock::TYPE_SHARED )

Property Details

$_db protected_oe property

The MongoDB Collection object for the cache data.
protected MongoCollection $_db
Résultat MongoCollection

$_map protected_oe property

Ugly hack: lock driver written with assumption that it returns data as defined by SQL columns. So need to do mapping in this driver.
protected array $_map
Résultat array