1*a1a3b679SAndreas Boehler<?php 2*a1a3b679SAndreas Boehler 3*a1a3b679SAndreas Boehlernamespace Sabre\DAV\Locks\Backend; 4*a1a3b679SAndreas Boehler 5*a1a3b679SAndreas Boehleruse Sabre\DAV\Locks; 6*a1a3b679SAndreas Boehler 7*a1a3b679SAndreas Boehler/** 8*a1a3b679SAndreas Boehler * If you are defining your own Locks backend, you must implement this 9*a1a3b679SAndreas Boehler * interface. 10*a1a3b679SAndreas Boehler * 11*a1a3b679SAndreas Boehler * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/). 12*a1a3b679SAndreas Boehler * @author Evert Pot (http://evertpot.com/) 13*a1a3b679SAndreas Boehler * @license http://sabre.io/license/ Modified BSD License 14*a1a3b679SAndreas Boehler */ 15*a1a3b679SAndreas Boehlerinterface BackendInterface { 16*a1a3b679SAndreas Boehler 17*a1a3b679SAndreas Boehler /** 18*a1a3b679SAndreas Boehler * Returns a list of Sabre\DAV\Locks\LockInfo objects 19*a1a3b679SAndreas Boehler * 20*a1a3b679SAndreas Boehler * This method should return all the locks for a particular uri, including 21*a1a3b679SAndreas Boehler * locks that might be set on a parent uri. 22*a1a3b679SAndreas Boehler * 23*a1a3b679SAndreas Boehler * If returnChildLocks is set to true, this method should also look for 24*a1a3b679SAndreas Boehler * any locks in the subtree of the uri for locks. 25*a1a3b679SAndreas Boehler * 26*a1a3b679SAndreas Boehler * @param string $uri 27*a1a3b679SAndreas Boehler * @param bool $returnChildLocks 28*a1a3b679SAndreas Boehler * @return array 29*a1a3b679SAndreas Boehler */ 30*a1a3b679SAndreas Boehler function getLocks($uri, $returnChildLocks); 31*a1a3b679SAndreas Boehler 32*a1a3b679SAndreas Boehler /** 33*a1a3b679SAndreas Boehler * Locks a uri 34*a1a3b679SAndreas Boehler * 35*a1a3b679SAndreas Boehler * @param string $uri 36*a1a3b679SAndreas Boehler * @param Locks\LockInfo $lockInfo 37*a1a3b679SAndreas Boehler * @return bool 38*a1a3b679SAndreas Boehler */ 39*a1a3b679SAndreas Boehler function lock($uri, Locks\LockInfo $lockInfo); 40*a1a3b679SAndreas Boehler 41*a1a3b679SAndreas Boehler /** 42*a1a3b679SAndreas Boehler * Removes a lock from a uri 43*a1a3b679SAndreas Boehler * 44*a1a3b679SAndreas Boehler * @param string $uri 45*a1a3b679SAndreas Boehler * @param Locks\LockInfo $lockInfo 46*a1a3b679SAndreas Boehler * @return bool 47*a1a3b679SAndreas Boehler */ 48*a1a3b679SAndreas Boehler function unlock($uri, Locks\LockInfo $lockInfo); 49*a1a3b679SAndreas Boehler 50*a1a3b679SAndreas Boehler} 51