]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAV/ServerPlugin.php
Update strings
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAV / ServerPlugin.php
1 <?php
2
3 /**
4  * The baseclass for all server addons.
5  *
6  * Plugins can modify or extend the servers behaviour.
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_ServerPlugin {
15
16     /**
17      * This initializes the addon.
18      *
19      * This function is called by Sabre_DAV_Server, after
20      * addPlugin is called.
21      *
22      * This method should set up the requires event subscriptions.
23      *
24      * @param Sabre_DAV_Server $server
25      * @return void
26      */
27     abstract public function initialize(Sabre_DAV_Server $server);
28
29     /**
30      * This method should return a list of server-features.
31      *
32      * This is for example 'versioning' and is added to the DAV: header
33      * in an OPTIONS response.
34      *
35      * @return array
36      */
37     public function getFeatures() {
38
39         return array();
40
41     }
42
43     /**
44      * Use this method to tell the server this addon defines additional
45      * HTTP methods.
46      *
47      * This method is passed a uri. It should only return HTTP methods that are
48      * available for the specified uri.
49      *
50      * @param string $uri
51      * @return array
52      */
53     public function getHTTPMethods($uri) {
54
55         return array();
56
57     }
58
59     /**
60      * Returns a addon name.
61      *
62      * Using this name other addons will be able to access other addons
63      * using Sabre_DAV_Server::getPlugin
64      *
65      * @return string
66      */
67     public function getPluginName() {
68
69         return get_class($this);
70
71     }
72
73     /**
74      * Returns a list of reports this addon supports.
75      *
76      * This will be used in the {DAV:}supported-report-set property.
77      * Note that you still need to subscribe to the 'report' event to actually
78      * implement them
79      *
80      * @param string $uri
81      * @return array
82      */
83     public function getSupportedReportSet($uri) {
84
85         return array();
86
87     }
88
89 }
90