ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
TestPlugin.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\DAV;
4
7
8class TestPlugin extends ServerPlugin {
9
11
12 function getFeatures() {
13
14 return ['drinking'];
15
16 }
17
18 function getHTTPMethods($uri) {
19
20 return ['BEER','WINE'];
21
22 }
23
25
26 $server->on('beforeMethod', [$this, 'beforeMethod']);
27
28 }
29
31
32 $this->beforeMethod = $request->getMethod();
33 return true;
34
35 }
36
37}
foreach($paths as $path) $request
Definition: asyncclient.php:32
An exception for terminatinating execution or to throw for unit testing.
The baseclass for all server plugins.
Main DAV server class.
Definition: Server.php:23
getHTTPMethods($uri)
Use this method to tell the server this plugin defines additional HTTP methods.
Definition: TestPlugin.php:18
initialize(Server $server)
This initializes the plugin.
Definition: TestPlugin.php:24
getFeatures()
This method should return a list of server-features.
Definition: TestPlugin.php:12
beforeMethod(RequestInterface $request, ResponseInterface $response)
Definition: TestPlugin.php:30
The RequestInterface represents a HTTP request.
getMethod()
Returns the current HTTP method.
This interface represents a HTTP response.
$response
$server
Definition: sabredav.php:48