Skip to content

SharingPlugin

This plugin implements support for caldav sharing.

This spec is defined at: http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk/doc/Extensions/caldav-sharing.txt

See: Sabre\CalDAV\Backend\SharingSupport for all the documentation.

Note: This feature is experimental, and may change in between different SabreDAV versions.

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

propFindEarly

This event is triggered when properties are requested for a certain node.

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

This allows us to inject any properties early.

Parameters:

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

propFindLate

This method is triggered after all properties have been retrieved.

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

This allows us to inject the correct resourcetype for calendars that have been shared.

Parameters:

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

propPatch

This method is trigged when a user attempts to update a node's properties.

public propPatch(string $path, \Sabre\DAV\PropPatch $propPatch): mixed

A previous draft of the sharing spec stated that it was possible to use PROPPATCH to remove 'shared-owner' from the resourcetype, thus unsharing the calendar.

Even though this is no longer in the current spec, we keep this around because OS X 10.7 may still make use of this feature.

Parameters:

Parameter Type Description
$path string
$propPatch \Sabre\DAV\PropPatch

httpPost

We intercept this to handle POST requests on calendars.

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

Parameters:

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

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.


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