ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Partial update plugin (Patch method) More...
Public Member Functions | |
initialize (DAV\Server $server) | |
Initializes the plugin. More... | |
getPluginName () | |
Returns a plugin name. More... | |
getHTTPMethods ($uri) | |
Use this method to tell the server this plugin defines additional HTTP methods. More... | |
getFeatures () | |
Returns a list of features for the HTTP OPTIONS Dav: header. More... | |
httpPatch (RequestInterface $request, ResponseInterface $response) | |
Patch an uri. More... | |
getHTTPUpdateRange (RequestInterface $request) | |
Returns the HTTP custom range update header. 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... | |
Data Fields | |
const | RANGE_APPEND = 1 |
const | RANGE_START = 2 |
const | RANGE_END = 3 |
Protected Attributes | |
$server | |
Partial update plugin (Patch method)
This plugin provides a way to modify only part of a target resource It may bu used to update a file chunk, upload big a file into smaller chunks or resume an upload.
$patchPlugin = new (); $server->addPlugin($patchPlugin);
Definition at line 23 of file Plugin.php.
Sabre\DAV\PartialUpdate\Plugin::getFeatures | ( | ) |
Returns a list of features for the HTTP OPTIONS Dav: header.
Definition at line 98 of file Plugin.php.
Sabre\DAV\PartialUpdate\Plugin::getHTTPMethods | ( | $uri | ) |
Use this method to tell the server this plugin defines additional HTTP methods.
This method is passed a uri. It should only return HTTP methods that are available for the specified uri.
We claim to support PATCH method (partirl update) if and only if
string | $uri |
Definition at line 79 of file Plugin.php.
References $tree.
Sabre\DAV\PartialUpdate\Plugin::getHTTPUpdateRange | ( | RequestInterface | $request | ) |
Returns the HTTP custom range update header.
This method returns null if there is no well-formed HTTP range request header. It returns array(1) if it was an append request, array(2, $start, $end) if it's a start and end range, lastly it's array(3, $endoffset) if the offset was negative, and should be calculated from the end of the file.
Examples:
null - invalid [1] - append [2,10,15] - update bytes 10, 11, 12, 13, 14, 15 [2,10,null] - update bytes 10 until the end of the patch body [3,-5] - update from 5 bytes from the end of the file.
RequestInterface | $request |
Definition at line 197 of file Plugin.php.
References Sabre\HTTP\MessageInterface\getHeader().
Referenced by Sabre\DAV\PartialUpdate\Plugin\httpPatch().
Sabre\DAV\PartialUpdate\Plugin::getPluginName | ( | ) |
Returns a plugin name.
Using this name other plugins will be able to access other plugins using DAV::getPlugin
Definition at line 59 of file Plugin.php.
Sabre\DAV\PartialUpdate\Plugin::httpPatch | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
Patch an uri.
The WebDAV patch request can be used to modify only a part of an existing resource. If the resource does not exist yet and the first offset is not 0, the request fails
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 115 of file Plugin.php.
References $contentType, $path, Sabre\HTTP\MessageInterface\getHeader(), Sabre\DAV\PartialUpdate\Plugin\getHTTPUpdateRange(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Sabre\DAV\PartialUpdate\Plugin::initialize | ( | DAV\Server | $server | ) |
Initializes the plugin.
This method is automatically called by the Server class after addPlugin.
DAV\Server | $server |
Definition at line 44 of file Plugin.php.
References Sabre\DAV\PartialUpdate\Plugin\$server.
|
protected |
Definition at line 34 of file Plugin.php.
Referenced by Sabre\DAV\PartialUpdate\Plugin\initialize().
const Sabre\DAV\PartialUpdate\Plugin::RANGE_APPEND = 1 |
Definition at line 25 of file Plugin.php.
const Sabre\DAV\PartialUpdate\Plugin::RANGE_END = 3 |
Definition at line 27 of file Plugin.php.
const Sabre\DAV\PartialUpdate\Plugin::RANGE_START = 2 |
Definition at line 26 of file Plugin.php.