]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAV/Locks/Backend/Abstract.php
Merge branch 'master' of ../../save/merge/frio_hovercard into frio
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAV / Locks / Backend / Abstract.php
1 <?php
2
3 /**
4  * The Lock manager allows you to handle all file-locks centrally.
5  *
6  * This is an alternative approach to doing this on a per-node basis
7  *
8  * @package Sabre
9  * @subpackage DAV
10  * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
11  * @author Evert Pot (http://www.rooftopsolutions.nl/)
12  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
13  */
14 abstract class Sabre_DAV_Locks_Backend_Abstract {
15
16     /**
17      * Returns a list of Sabre_DAV_Locks_LockInfo objects
18      *
19      * This method should return all the locks for a particular uri, including
20      * locks that might be set on a parent uri.
21      *
22      * If returnChildLocks is set to true, this method should also look for
23      * any locks in the subtree of the uri for locks.
24      *
25      * @param string $uri
26      * @param bool $returnChildLocks
27      * @return array
28      */
29     abstract function getLocks($uri, $returnChildLocks);
30
31     /**
32      * Locks a uri
33      *
34      * @param string $uri
35      * @param Sabre_DAV_Locks_LockInfo $lockInfo
36      * @return bool
37      */
38     abstract function lock($uri,Sabre_DAV_Locks_LockInfo $lockInfo);
39
40     /**
41      * Removes a lock from a uri
42      *
43      * @param string $uri
44      * @param Sabre_DAV_Locks_LockInfo $lockInfo
45      * @return bool
46      */
47     abstract function unlock($uri,Sabre_DAV_Locks_LockInfo $lockInfo);
48
49 }
50