Skip to content

Plugin

This plugin implements HTTP requests and properties related to:.

draft-pot-webdav-resource-sharing

This specification allows people to share webdav resources with others.

Constants

Constant Visibility Type Value
ACCESS_NOTSHARED public 0
ACCESS_SHAREDOWNER public 1
ACCESS_READ public 2
ACCESS_READWRITE public 3
ACCESS_NOACCESS public 4
INVITE_NORESPONSE public 1
INVITE_ACCEPTED public 2
INVITE_DECLINED public 3
INVITE_INVALID public 4

Properties

server

Reference to SabreDAV server object.

protected \Sabre\DAV\Server $server

Methods

getFeatures

This method should return a list of server-features.

public getFeatures(): array

This is for example 'versioning' and is added to the DAV: header in an OPTIONS response.


getPluginName

Returns a plugin name.

public getPluginName(): string

Using this name other plugins will be able to access other plugins using \Sabre\DAV\Server::getPlugin


initialize

This initializes the plugin.

public initialize(\Sabre\DAV\Server $server): mixed

This function is called by Sabre\DAV\Server, after addPlugin is called.

This method should set up the required event subscriptions.

Parameters:

Parameter Type Description
$server \Sabre\DAV\Server

shareResource

Updates the list of sharees on a shared resource.

public shareResource(string $path, \Sabre\DAV\Xml\Element\Sharee[] $sharees): mixed

The sharees array is a list of people that are to be added modified or removed in the list of shares.

Parameters:

Parameter Type Description
$path string
$sharees \Sabre\DAV\Xml\Element\Sharee[]

propFind

This event is triggered when properties are requested for nodes.

public propFind(\Sabre\DAV\PropFind $propFind, \Sabre\DAV\INode $node): mixed

This allows us to inject any sharings-specific properties.

Parameters:

Parameter Type Description
$propFind \Sabre\DAV\PropFind
$node \Sabre\DAV\INode

httpPost

We intercept this to handle POST requests on shared resources.

public httpPost(\Sabre\HTTP\RequestInterface $request, \Sabre\HTTP\ResponseInterface $response): bool|null

Parameters:

Parameter Type Description
$request \Sabre\HTTP\RequestInterface
$response \Sabre\HTTP\ResponseInterface

getSupportedPrivilegeSet

This method is triggered whenever a subsystem reqeuests the privileges hat are supported on a particular node.

public getSupportedPrivilegeSet(\Sabre\DAV\INode $node, array& $supportedPrivilegeSet): mixed

We need to add a number of privileges for scheduling purposes.

Parameters:

Parameter Type Description
$node \Sabre\DAV\INode
$supportedPrivilegeSet array

getPluginInfo

Returns a bunch of meta-data about the plugin.

public getPluginInfo(): array

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.


htmlActionsPanel

This method is used to generate HTML output for the DAV\Browser\Plugin.

public htmlActionsPanel(\Sabre\DAV\INode $node, string& $output, string $path): bool|null

Parameters:

Parameter Type Description
$node \Sabre\DAV\INode
$output string
$path string

browserPostAction

This method is triggered for POST actions generated by the browser plugin.

public browserPostAction(string $path, string $action, array $postVars): mixed

Parameters:

Parameter Type Description
$path string
$action string
$postVars array

Inherited methods

initialize

This initializes the plugin.

public initialize(\Sabre\DAV\Server $server): mixed

This function is called by Sabre\DAV\Server, after addPlugin is called.

This method should set up the required event subscriptions.

  • This method is abstract.

Parameters:

Parameter Type Description
$server \Sabre\DAV\Server

getFeatures

This method should return a list of server-features.

public getFeatures(): array

This is for example 'versioning' and is added to the DAV: header in an OPTIONS response.


getHTTPMethods

Use this method to tell the server this plugin defines additional HTTP methods.

public getHTTPMethods(string $path): array

This method is passed a uri. It should only return HTTP methods that are available for the specified uri.

Parameters:

Parameter Type Description
$path string

getPluginName

Returns a plugin name.

public getPluginName(): string

Using this name other plugins will be able to access other plugins using \Sabre\DAV\Server::getPlugin


getSupportedReportSet

Returns a list of reports this plugin supports.

public getSupportedReportSet(string $uri): array

This will be used in the {DAV:}supported-report-set property. Note that you still need to subscribe to the 'report' event to actually implement them

Parameters:

Parameter Type Description
$uri string

getPluginInfo

Returns a bunch of meta-data about the plugin.

public getPluginInfo(): array

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.



Automatically generated on 2025-03-18