aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/TestPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/TestPlugin.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/TestPlugin.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/TestPlugin.php b/vendor/sabre/dav/tests/Sabre/DAV/TestPlugin.php
index 9cf5edbb0..bb5ea6acc 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/TestPlugin.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/TestPlugin.php
@@ -2,31 +2,35 @@
namespace Sabre\DAV;
+use
+ Sabre\HTTP\RequestInterface,
+ Sabre\HTTP\ResponseInterface;
+
class TestPlugin extends ServerPlugin {
public $beforeMethod;
function getFeatures() {
- return array('drinking');
+ return ['drinking'];
}
function getHTTPMethods($uri) {
- return array('BEER','WINE');
+ return ['BEER','WINE'];
}
function initialize(Server $server) {
- $server->subscribeEvent('beforeMethod',array($this,'beforeMethod'));
+ $server->on('beforeMethod', [$this,'beforeMethod']);
}
- function beforeMethod($method) {
+ function beforeMethod(RequestInterface $request, ResponseInterface $response) {
- $this->beforeMethod = $method;
+ $this->beforeMethod = $request->getMethod();
return true;
}