ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
TestPlugin.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAV;
4 
7 
8 class TestPlugin extends ServerPlugin {
9 
10  public $beforeMethod;
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 }
This interface represents a HTTP response.
The RequestInterface represents a HTTP request.
The baseclass for all server plugins.
on($eventName, callable $callBack, $priority=100)
Subscribe to an event.
foreach($paths as $path) $request
Definition: asyncclient.php:32
initialize(Server $server)
Definition: TestPlugin.php:24
$server
Definition: sabredav.php:48
Main DAV server class.
Definition: Server.php:23
getMethod()
Returns the current HTTP method.
beforeMethod(RequestInterface $request, ResponseInterface $response)
Definition: TestPlugin.php:30
$response