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
Sat, Dec 21, 12:50 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914588
Default Alt Text
TestPlugin.php (594 B)

Event Timeline