Documentation

PDO extends AbstractBackend
in package

The Lock manager allows you to handle all file-locks centrally.

This Lock Manager stores all its data in a database. You must pass a PDO connection object in the constructor.

Tags
copyright

Copyright (C) fruux GmbH (https://fruux.com/)

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

Table of Contents

$tableName  : string
The PDO tablename this backend uses.
$pdo  : pdo
The PDO connection object.
__construct()  : mixed
Constructor.
getLocks()  : array<string|int, mixed>
Returns a list of Sabre\DAV\Locks\LockInfo objects.
lock()  : bool
Locks a uri.
unlock()  : bool
Removes a lock from a uri.

Properties

$tableName

The PDO tablename this backend uses.

public string $tableName = 'locks'

$pdo

The PDO connection object.

protected pdo $pdo

Methods

__construct()

Constructor.

public __construct(PDO $pdo) : mixed
Parameters
$pdo : PDO
Return values
mixed

getLocks()

Returns a list of Sabre\DAV\Locks\LockInfo objects.

public getLocks(string $uri, bool $returnChildLocks) : array<string|int, mixed>

This method should return all the locks for a particular uri, including locks that might be set on a parent uri.

If returnChildLocks is set to true, this method should also look for any locks in the subtree of the uri for locks.

Parameters
$uri : string
$returnChildLocks : bool
Return values
array<string|int, mixed>

lock()

Locks a uri.

public lock(string $uri, LockInfo $lockInfo) : bool
Parameters
$uri : string
$lockInfo : LockInfo
Return values
bool

unlock()

Removes a lock from a uri.

public unlock(string $uri, LockInfo $lockInfo) : bool
Parameters
$uri : string
$lockInfo : LockInfo
Return values
bool

Search results