Page MenuHomePhabricator

TestPlugin.php
No OneTemporary

TestPlugin.php

<?php
namespace Sabre\DAV;
use
Sabre\HTTP\RequestInterface,
Sabre\HTTP\ResponseInterface;
class TestPlugin extends ServerPlugin {
public $beforeMethod;
function getFeatures() {
return ['drinking'];
}
function getHTTPMethods($uri) {
return ['BEER','WINE'];
}
function initialize(Server $server) {
$server->on('beforeMethod', [$this,'beforeMethod']);
}
function beforeMethod(RequestInterface $request, ResponseInterface $response) {
$this->beforeMethod = $request->getMethod();
return true;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Dec 23, 2:42 AM (1 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914588
Default Alt Text
TestPlugin.php (594 B)

Event Timeline