ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\Browser\MapGetToPropFind Class Reference

This is a simple plugin that will map any GET request for non-files to PROPFIND allprops-requests. More...

+ Inheritance diagram for Sabre\DAV\Browser\MapGetToPropFind:
+ Collaboration diagram for Sabre\DAV\Browser\MapGetToPropFind:

Public Member Functions

 initialize (DAV\Server $server)
 Initializes the plugin and subscribes to events. More...
 
 httpGet (RequestInterface $request, ResponseInterface $response)
 This method intercepts GET requests to non-files, and changes it into an HTTP PROPFIND request. More...
 
- Public Member Functions inherited from Sabre\DAV\ServerPlugin
 initialize (Server $server)
 This initializes the plugin. More...
 
 getFeatures ()
 This method should return a list of server-features. More...
 
 getHTTPMethods ($path)
 Use this method to tell the server this plugin defines additional HTTP methods. More...
 
 getPluginName ()
 Returns a plugin name. More...
 
 getSupportedReportSet ($uri)
 Returns a list of reports this plugin supports. More...
 
 getPluginInfo ()
 Returns a bunch of meta-data about the plugin. More...
 

Protected Attributes

 $server
 

Detailed Description

This is a simple plugin that will map any GET request for non-files to PROPFIND allprops-requests.

This should allow easy debugging of PROPFIND

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 19 of file MapGetToPropFind.php.

Member Function Documentation

◆ httpGet()

Sabre\DAV\Browser\MapGetToPropFind::httpGet ( RequestInterface  $request,
ResponseInterface  $response 
)

This method intercepts GET requests to non-files, and changes it into an HTTP PROPFIND request.

Parameters
RequestInterface$request
ResponseInterface$response
Returns
bool

Definition at line 47 of file MapGetToPropFind.php.

References $request, $subRequest, and Sabre\HTTP\RequestInterface\getPath().

47  {
48 
49  $node = $this->server->tree->getNodeForPath($request->getPath());
50  if ($node instanceof DAV\IFile) return;
51 
52  $subRequest = clone $request;
53  $subRequest->setMethod('PROPFIND');
54 
55  $this->server->invokeMethod($subRequest, $response);
56  return false;
57 
58  }
foreach($paths as $path) $request
Definition: asyncclient.php:32
$subRequest
$response
+ Here is the call graph for this function:

◆ initialize()

Sabre\DAV\Browser\MapGetToPropFind::initialize ( DAV\Server  $server)

Initializes the plugin and subscribes to events.

Parameters
DAV\Server$server
Returns
void

Definition at line 34 of file MapGetToPropFind.php.

References Sabre\DAV\Browser\MapGetToPropFind\$server.

34  {
35 
36  $this->server = $server;
37  $this->server->on('method:GET', [$this, 'httpGet'], 90);
38  }

Field Documentation

◆ $server

Sabre\DAV\Browser\MapGetToPropFind::$server
protected

Definition at line 26 of file MapGetToPropFind.php.

Referenced by Sabre\DAV\Browser\MapGetToPropFind\initialize().


The documentation for this class was generated from the following file: