ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($enablePost=true) | |
Creates the object. More... | |
initialize (DAV\Server $server) | |
Initializes the plugin and subscribes to events. More... | |
httpGetEarly (RequestInterface $request, ResponseInterface $response) | |
This method intercepts GET requests that have ?sabreAction=info appended to the URL. More... | |
httpGet (RequestInterface $request, ResponseInterface $response) | |
This method intercepts GET requests to collections and returns the html. More... | |
httpPOST (RequestInterface $request, ResponseInterface $response) | |
Handles POST requests for tree operations. More... | |
escapeHTML ($value) | |
Escapes a string for html. More... | |
generateDirectoryIndex ($path) | |
Generates the html directory index for a given url. More... | |
generatePluginListing () | |
Generates the 'plugins' page. More... | |
generateHeader ($title, $path=null) | |
Generates the first block of HTML, including the <head> tag and page header. More... | |
generateFooter () | |
Generates the page footer. More... | |
htmlActionsPanel (DAV\INode $node, &$output, $path) | |
This method is used to generate the 'actions panel' output for collections. More... | |
getPluginName () | |
Returns a plugin name. More... | |
getPluginInfo () | |
Returns a bunch of meta-data about the plugin. More... | |
![]() | |
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 | |
$uninterestingProperties | |
Protected Member Functions | |
getAssetUrl ($assetName) | |
This method takes a path/name of an asset and turns it into url suiteable for http access. More... | |
getLocalAssetPath ($assetName) | |
This method returns a local pathname to an asset. More... | |
serveAsset ($assetName) | |
This method reads an asset from disk and generates a full http response. More... | |
compareNodes ($a, $b) | |
Sort helper function: compares two directory entries based on type and display name. More... | |
Protected Attributes | |
$server | |
$enablePost = true | |
Private Member Functions | |
mapResourceType (array $resourceTypes, $node) | |
Maps a resource type to a human-readable string and icon. More... | |
drawPropertyRow ($name, $value) | |
Draws a table row for a property. More... | |
drawPropertyValue ($html, $value) | |
Draws a table row for a property. More... | |
This plugin provides a html representation, so that a WebDAV server may be accessed using a browser.
The class intercepts GET requests to collection resources and generates a simple html index.
Definition at line 24 of file Plugin.php.
Sabre\DAV\Browser\Plugin::__construct | ( | $enablePost = true | ) |
Creates the object.
By default it will allow file creation and uploads. Specify the first argument as false to disable this
bool | $enablePost |
Definition at line 63 of file Plugin.php.
References Sabre\DAV\Browser\Plugin\$enablePost.
|
protected |
Sort helper function: compares two directory entries based on type and display name.
Collections sort above other types.
array | $a | |
array | $b |
Definition at line 608 of file Plugin.php.
|
private |
Draws a table row for a property.
string | $name | |
mixed | $value |
Definition at line 726 of file Plugin.php.
References $html, $name, and Sabre\DAV\Browser\Plugin\drawPropertyValue().
Referenced by Sabre\DAV\Browser\Plugin\generateDirectoryIndex().
|
private |
Draws a table row for a property.
HtmlOutputHelper | $html | |
mixed | $value |
Definition at line 744 of file Plugin.php.
Referenced by Sabre\DAV\Browser\Plugin\drawPropertyRow().
Sabre\DAV\Browser\Plugin::escapeHTML | ( | $value | ) |
Escapes a string for html.
string | $value |
Definition at line 253 of file Plugin.php.
Referenced by Sabre\DAV\Browser\Plugin\generateDirectoryIndex(), Sabre\DAV\Browser\Plugin\generateHeader(), and Sabre\DAV\Browser\Plugin\generatePluginListing().
Sabre\DAV\Browser\Plugin::generateDirectoryIndex | ( | $path | ) |
Generates the html directory index for a given url.
string | $path |
Definition at line 265 of file Plugin.php.
References $html, Sabre\VObject\$output, $path, $type, Sabre\DAV\Browser\Plugin\drawPropertyRow(), Sabre\HTTP\URLUtil\encodePath(), Sabre\DAV\Browser\Plugin\escapeHTML(), Sabre\DAV\Browser\Plugin\generateFooter(), Sabre\DAV\Browser\Plugin\generateHeader(), Sabre\DAV\Browser\Plugin\mapResourceType(), and Sabre\HTTP\URLUtil\splitPath().
Referenced by Sabre\DAV\Browser\Plugin\httpGet().
Sabre\DAV\Browser\Plugin::generateFooter | ( | ) |
Generates the page footer.
Returns html.
Definition at line 479 of file Plugin.php.
References Sabre\DAV\Server\$exposeVersion, $version, html(), ILIAS\FileDelivery\http(), and Sabre\DAV\Version\VERSION.
Referenced by Sabre\DAV\Browser\Plugin\generateDirectoryIndex(), and Sabre\DAV\Browser\Plugin\generatePluginListing().
Sabre\DAV\Browser\Plugin::generateHeader | ( | $title, | |
$path = null |
|||
) |
Generates the first block of HTML, including the <head> tag and page header.
Returns footer.
string | $title | |
string | $path |
Definition at line 419 of file Plugin.php.
References Sabre\DAV\Server\$exposeVersion, $html, $path, $title, $version, Sabre\HTTP\URLUtil\encodePath(), Sabre\DAV\Browser\Plugin\escapeHTML(), Sabre\DAV\Browser\Plugin\getAssetUrl(), html(), Sabre\HTTP\URLUtil\splitPath(), and Sabre\DAV\Version\VERSION.
Referenced by Sabre\DAV\Browser\Plugin\generateDirectoryIndex(), and Sabre\DAV\Browser\Plugin\generatePluginListing().
Sabre\DAV\Browser\Plugin::generatePluginListing | ( | ) |
Generates the 'plugins' page.
Definition at line 382 of file Plugin.php.
References $html, $info, Sabre\DAV\Browser\Plugin\escapeHTML(), Sabre\DAV\Browser\Plugin\generateFooter(), and Sabre\DAV\Browser\Plugin\generateHeader().
Referenced by Sabre\DAV\Browser\Plugin\httpGet().
|
protected |
This method takes a path/name of an asset and turns it into url suiteable for http access.
string | $assetName |
Definition at line 540 of file Plugin.php.
Referenced by Sabre\DAV\Browser\Plugin\generateHeader().
|
protected |
This method returns a local pathname to an asset.
string | $assetName |
DAV |
Definition at line 553 of file Plugin.php.
References $path.
Referenced by Sabre\DAV\Browser\Plugin\serveAsset().
Sabre\DAV\Browser\Plugin::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 792 of file Plugin.php.
References Sabre\DAV\Browser\Plugin\getPluginName().
Sabre\DAV\Browser\Plugin::getPluginName | ( | ) |
Returns a plugin name.
Using this name other plugins will be able to access other plugins; using ::getPlugin
Definition at line 775 of file Plugin.php.
Referenced by Sabre\DAV\Browser\Plugin\getPluginInfo().
Sabre\DAV\Browser\Plugin::htmlActionsPanel | ( | DAV\INode | $node, |
& | $output, | ||
$path | |||
) |
This method is used to generate the 'actions panel' output for collections.
This specifically generates the interfaces for creating new files, and creating new directories.
DAV\INode | $node | |
mixed | $output | |
string | $path |
Definition at line 505 of file Plugin.php.
References Sabre\VObject\$output, and input.
Sabre\DAV\Browser\Plugin::httpGet | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
This method intercepts GET requests to collections and returns the html.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 108 of file Plugin.php.
References Sabre\DAV\Browser\Plugin\generateDirectoryIndex(), Sabre\DAV\Browser\Plugin\generatePluginListing(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\RequestInterface\getQueryParameters(), Sabre\DAV\Browser\Plugin\serveAsset(), Sabre\HTTP\MessageInterface\setBody(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Referenced by Sabre\DAV\Browser\Plugin\httpGetEarly().
Sabre\DAV\Browser\Plugin::httpGetEarly | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
This method intercepts GET requests that have ?sabreAction=info appended to the URL.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 92 of file Plugin.php.
References PHPMailer\PHPMailer\$params, Sabre\HTTP\RequestInterface\getQueryParameters(), and Sabre\DAV\Browser\Plugin\httpGet().
Sabre\DAV\Browser\Plugin::httpPOST | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
Handles POST requests for tree operations.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 165 of file Plugin.php.
References $contentType, Sabre\HTTP\MessageInterface\getHeader(), Sabre\HTTP\RequestInterface\getPath(), Sabre\HTTP\RequestInterface\getPostData(), Sabre\HTTP\RequestInterface\getUrl(), Sabre\HTTP\MessageInterface\setHeader(), Sabre\HTTP\ResponseInterface\setStatus(), and Sabre\HTTP\URLUtil\splitPath().
Sabre\DAV\Browser\Plugin::initialize | ( | DAV\Server | $server | ) |
Initializes the plugin and subscribes to events.
DAV\Server | $server |
Definition at line 75 of file Plugin.php.
References Sabre\DAV\Browser\Plugin\$server.
|
private |
Maps a resource type to a human-readable string and icon.
array | $resourceTypes | |
DAV\INode | $node |
Definition at line 633 of file Plugin.php.
Referenced by Sabre\DAV\Browser\Plugin\generateDirectoryIndex().
|
protected |
This method reads an asset from disk and generates a full http response.
string | $assetName |
Definition at line 575 of file Plugin.php.
References $map, and Sabre\DAV\Browser\Plugin\getLocalAssetPath().
Referenced by Sabre\DAV\Browser\Plugin\httpGet().
|
protected |
Definition at line 39 of file Plugin.php.
Referenced by Sabre\DAV\Browser\Plugin\__construct().
|
protected |
Definition at line 31 of file Plugin.php.
Referenced by Sabre\DAV\Browser\Plugin\initialize().
Sabre\DAV\Browser\Plugin::$uninterestingProperties |
Definition at line 48 of file Plugin.php.