Blame view
sources/3rdparty/sabre/dav/lib/Sabre/DAV/ServerPlugin.php
1.95 KB
|
03e52840d
|
1 |
<?php |
|
6d9380f96
|
2 |
namespace Sabre\DAV; |
|
03e52840d
|
3 4 5 6 7 |
/** * The baseclass for all server plugins. * * Plugins can modify or extend the servers behaviour. * |
|
6d9380f96
|
8 9 10 |
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/). * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License |
|
03e52840d
|
11 |
*/ |
|
6d9380f96
|
12 |
abstract class ServerPlugin {
|
|
03e52840d
|
13 14 15 16 |
/**
* This initializes the plugin.
*
|
|
6d9380f96
|
17 |
* This function is called by Sabre\DAV\Server, after |
|
03e52840d
|
18 19 20 21 |
* addPlugin is called.
*
* This method should set up the required event subscriptions.
*
|
|
6d9380f96
|
22 |
* @param Server $server |
|
03e52840d
|
23 24 |
* @return void
*/
|
|
6d9380f96
|
25 |
abstract public function initialize(Server $server); |
|
03e52840d
|
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
/**
* This method should return a list of server-features.
*
* This is for example 'versioning' and is added to the DAV: header
* in an OPTIONS response.
*
* @return array
*/
public function getFeatures() {
return array();
}
/**
* Use this method to tell the server this plugin defines additional
* HTTP methods.
*
* This method is passed a uri. It should only return HTTP methods that are
* available for the specified uri.
*
* @param string $uri
* @return array
*/
public function getHTTPMethods($uri) {
return array();
}
/**
* Returns a plugin name.
*
* Using this name other plugins will be able to access other plugins
|
|
6d9380f96
|
61 |
* using \Sabre\DAV\Server::getPlugin |
|
03e52840d
|
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
*
* @return string
*/
public function getPluginName() {
return get_class($this);
}
/**
* Returns a list of reports this plugin supports.
*
* This will be used in the {DAV:}supported-report-set property.
* Note that you still need to subscribe to the 'report' event to actually
* implement them
*
* @param string $uri
* @return array
*/
public function getSupportedReportSet($uri) {
return array();
}
}
|