]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAV/IProperties.php
Merge remote branch 'friendica/master'
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAV / IProperties.php
1 <?php
2
3 /**
4  * IProperties interface
5  *
6  * Implement this interface to support custom WebDAV properties requested and sent from clients.
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 interface Sabre_DAV_IProperties extends Sabre_DAV_INode {
15
16     /**
17      * Updates properties on this node,
18      *
19      * The properties array uses the propertyName in clark-notation as key,
20      * and the array value for the property value. In the case a property
21      * should be deleted, the property value will be null.
22      *
23      * This method must be atomic. If one property cannot be changed, the
24      * entire operation must fail.
25      *
26      * If the operation was successful, true can be returned.
27      * If the operation failed, false can be returned.
28      *
29      * Deletion of a non-existent property is always successful.
30      *
31      * Lastly, it is optional to return detailed information about any
32      * failures. In this case an array should be returned with the following
33      * structure:
34      *
35      * array(
36      *   403 => array(
37      *      '{DAV:}displayname' => null,
38      *   ),
39      *   424 => array(
40      *      '{DAV:}owner' => null,
41      *   )
42      * )
43      *
44      * In this example it was forbidden to update {DAV:}displayname.
45      * (403 Forbidden), which in turn also caused {DAV:}owner to fail
46      * (424 Failed Dependency) because the request needs to be atomic.
47      *
48      * @param array $mutations
49      * @return bool|array
50      */
51     function updateProperties($mutations);
52
53     /**
54      * Returns a list of properties for this nodes.
55      *
56      * The properties list is a list of propertynames the client requested,
57      * encoded in clark-notation {xmlnamespace}tagname
58      *
59      * If the array is empty, it means 'all properties' were requested.
60      *
61      * @param array $properties
62      * @return void
63      */
64     function getProperties($properties);
65
66 }
67