ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
The core plugin provides all the basic features for a WebDAV server. More...
Public Member Functions | |
initialize (Server $server) | |
Sets up the plugin. More... | |
getPluginName () | |
Returns a plugin name. More... | |
httpGet (RequestInterface $request, ResponseInterface $response) | |
This is the default implementation for the GET method. More... | |
httpOptions (RequestInterface $request, ResponseInterface $response) | |
HTTP OPTIONS. More... | |
httpHead (RequestInterface $request, ResponseInterface $response) | |
HTTP HEAD. More... | |
httpDelete (RequestInterface $request, ResponseInterface $response) | |
HTTP Delete. More... | |
httpPropFind (RequestInterface $request, ResponseInterface $response) | |
WebDAV PROPFIND. More... | |
httpPropPatch (RequestInterface $request, ResponseInterface $response) | |
WebDAV PROPPATCH. More... | |
httpPut (RequestInterface $request, ResponseInterface $response) | |
HTTP PUT method. More... | |
httpMkcol (RequestInterface $request, ResponseInterface $response) | |
WebDAV MKCOL. More... | |
httpMove (RequestInterface $request, ResponseInterface $response) | |
WebDAV HTTP MOVE method. More... | |
httpCopy (RequestInterface $request, ResponseInterface $response) | |
WebDAV HTTP COPY method. More... | |
httpReport (RequestInterface $request, ResponseInterface $response) | |
HTTP REPORT method implementation. More... | |
propPatchProtectedPropertyCheck ($path, PropPatch $propPatch) | |
This method is called during property updates. More... | |
propPatchNodeUpdate ($path, PropPatch $propPatch) | |
This method is called during property updates. More... | |
propFind (PropFind $propFind, INode $node) | |
This method is called when properties are retrieved. More... | |
propFindNode (PropFind $propFind, INode $node) | |
Fetches properties for a node. More... | |
propFindLate (PropFind $propFind, INode $node) | |
This method is called when properties are retrieved. More... | |
exception ($e) | |
Listens for exception events, and automatically logs them. More... | |
getPluginInfo () | |
Returns a bunch of meta-data about the plugin. 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 | |
The core plugin provides all the basic features for a WebDAV server.
Definition at line 17 of file CorePlugin.php.
Sabre\DAV\CorePlugin::exception | ( | $e | ) |
Listens for exception events, and automatically logs them.
Exception | $e |
Definition at line 912 of file CorePlugin.php.
References $code, Psr\Log\LogLevel\CRITICAL, Psr\Log\LogLevel\ERROR, and Psr\Log\LogLevel\INFO.
Sabre\DAV\CorePlugin::getPluginInfo | ( | ) |
Returns a bunch of meta-data about the plugin.
Providing this information is optional, and is mainly displayed by the Browser plugin.
The description key in the returned array may contain html and will not be sanitized.
Definition at line 950 of file CorePlugin.php.
References Sabre\DAV\CorePlugin\getPluginName().
Sabre\DAV\CorePlugin::getPluginName | ( | ) |
Returns a plugin name.
Using this name other plugins will be able to access other plugins using DAV::getPlugin
Definition at line 65 of file CorePlugin.php.
Referenced by Sabre\DAV\CorePlugin\getPluginInfo().
Sabre\DAV\CorePlugin::httpCopy | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
This method copies one uri to a different uri, and works much like the MOVE request A lot of the actual request processing is done in getCopyMoveInfo
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 672 of file CorePlugin.php.
References $path, Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpDelete | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
HTTP Delete.
The HTTP delete method, deletes a given uri
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 282 of file CorePlugin.php.
References $path, Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpGet | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
This is the default implementation for the GET method.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 78 of file CorePlugin.php.
References $end, $path, $start, GuzzleHttp\Psr7\$stream, Sabre\HTTP\MessageInterface\addHeaders(), Sabre\HTTP\MessageInterface\getHeader(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setBody(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpHead | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
HTTP HEAD.
This method is normally used to take a peak at a url, and only get the HTTP response headers, without the body. This is used by clients to determine if a remote file was changed, so they can use a local cached version, instead of downloading it again
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 245 of file CorePlugin.php.
References $request, $subRequest, Sabre\HTTP\MessageInterface\setBody(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpMkcol | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
WebDAV MKCOL.
The MKCOL method is used to create a new collection (directory) on the server
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 552 of file CorePlugin.php.
References $contentType, $path, $result, Sabre\HTTP\MessageInterface\getBodyAsString(), Sabre\HTTP\MessageInterface\getHeader(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setBody(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpMove | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
This method moves one uri to a different uri. A lot of the actual request processing is done in getCopyMoveInfo
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 620 of file CorePlugin.php.
References $path, Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpOptions | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
HTTP OPTIONS.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 210 of file CorePlugin.php.
References Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpPropFind | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
WebDAV PROPFIND.
This WebDAV method requests information about an uri resource, or a list of resources If a client wants to receive the properties for a single resource it will add an HTTP Depth: header with a 0 value If the value is 1, it means that it also expects a list of sub-resources (e.g.: files in a directory)
The request body contains an XML data structure that has a list of properties the client understands The response body is also an xml document, containing information about every uri resource and the requested properties
It has to return a HTTP 207 Multi-status status code
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 315 of file CorePlugin.php.
References $data, $path, Sabre\HTTP\MessageInterface\getBodyAsString(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setBody(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpPropPatch | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
WebDAV PROPPATCH.
This method is called to update properties on a Node. The request is an XML body with all the mutations. In this XML body it is specified which properties should be set/updated and/or deleted
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 374 of file CorePlugin.php.
References $code, $ok, $path, $result, Sabre\HTTP\MessageInterface\getBody(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setBody(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpPut | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
HTTP PUT method.
This HTTP method updates a file, or creates a new one.
If a new resource was created, a 201 Created status code should be returned. If an existing resource is updated, it's a 204 No Content
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 447 of file CorePlugin.php.
References $path, Sabre\HTTP\MessageInterface\getBodyAsStream(), Sabre\HTTP\MessageInterface\getHeader(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\CorePlugin::httpReport | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
HTTP REPORT method implementation.
Although the REPORT method is not part of the standard WebDAV spec (it's from rfc3253) It's used in a lot of extensions, so it made sense to implement it into the core.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 708 of file CorePlugin.php.
References $path, $result, Sabre\HTTP\MessageInterface\getBody(), Sabre\HTTP\RequestInterface\getPath(), and Sabre\HTTP\RequestInterface\getUrl().
Sabre\DAV\CorePlugin::initialize | ( | Server | $server | ) |
Sets up the plugin.
Server | $server |
Definition at line 32 of file CorePlugin.php.
References Sabre\DAV\CorePlugin\$server, and Sabre\Event\EventEmitterInterface\on().
This method is called when properties are retrieved.
Here we add all the default properties.
Definition at line 787 of file CorePlugin.php.
References Sabre\DAV\INode\getLastModified(), Sabre\DAV\PropFind\getPath(), and Sabre\DAV\PropFind\handle().
This method is called when properties are retrieved.
This specific handler is called very late in the process, because we want other systems to first have a chance to handle the properties.
Definition at line 867 of file CorePlugin.php.
References $result, Sabre\DAV\PropFind\get(), Sabre\DAV\PropFind\getPath(), and Sabre\DAV\PropFind\handle().
Fetches properties for a node.
This event is called a bit later, so plugins have a chance first to populate the result.
Definition at line 844 of file CorePlugin.php.
References Sabre\DAV\PropFind\get404Properties(), and Sabre\DAV\PropFind\set().
Sabre\DAV\CorePlugin::propPatchNodeUpdate | ( | $path, | |
PropPatch | $propPatch | ||
) |
This method is called during property updates.
Here we check if a node implements IProperties and let the node handle updating of (some) properties.
string | $path | |
PropPatch | $propPatch |
Definition at line 767 of file CorePlugin.php.
References $path.
Sabre\DAV\CorePlugin::propPatchProtectedPropertyCheck | ( | $path, | |
PropPatch | $propPatch | ||
) |
This method is called during property updates.
Here we check if a user attempted to update a protected property and ensure that the process fails if this is the case.
string | $path | |
PropPatch | $propPatch |
Definition at line 741 of file CorePlugin.php.
References Sabre\DAV\PropPatch\getMutations(), and Sabre\DAV\PropPatch\setResultCode().
|
protected |
Definition at line 24 of file CorePlugin.php.
Referenced by Sabre\DAV\CorePlugin\initialize().