PHP Класс Horde_Lock_Mongo, horde

Автор: Michael Slusarz ([email protected])
Наследование: extends Horde_Lock
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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 )

Защищенные методы

Метод Описание
_mapFields ( $res ) : array Map return to SQL fields.

Описание методов

__construct() публичный Метод

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

__destruct() публичный Метод

Destructor.
public __destruct ( )

_mapFields() защищенный Метод

Map return to SQL fields.
protected _mapFields ( $res ) : array
Результат array

clearLock() публичный Метод

public clearLock ( $lockid )

gc() публичный Метод

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

getLockInfo() публичный Метод

public getLockInfo ( $lockid )

getLocks() публичный Метод

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

resetLock() публичный Метод

public resetLock ( $lockid, $lifetime )

setLock() публичный Метод

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

Описание свойств

$_db защищенное свойство

The MongoDB Collection object for the cache data.
protected MongoCollection $_db
Результат MongoCollection

$_map защищенное свойство

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
Результат array