Documentation

ICSExportPlugin extends ServerPlugin
in package

ICS Exporter.

This plugin adds the ability to export entire calendars as .ics files. This is useful for clients that don't support CalDAV yet. They often do support ics files.

To use this, point a http client to a caldav calendar, and add ?expand to the url.

Further options that can be added to the url: start=123456789 - Only return events after the given unix timestamp end=123245679 - Only return events from before the given unix timestamp expand=1 - Strip timezone information and expand recurring events. If you'd like to expand, you must also specify start and end.

By default this plugin returns data in the text/calendar format (iCalendar 2.0). If you'd like to receive jCal data instead, you can use an Accept header:

Accept: application/calendar+json

Alternatively, you can also specify this in the url using accept=application/calendar+json, or accept=jcal for short. If the url parameter and Accept header is specified, the url parameter wins.

Note that specifying a start or end data implies that only events will be returned. VTODO and VJOURNAL will be stripped.

Tags
copyright

Copyright (C) fruux GmbH (https://fruux.com/)

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

Table of Contents

$server  : Server
Reference to Server class.
getFeatures()  : array<string|int, mixed>
This method should return a list of server-features.
getHTTPMethods()  : array<string|int, mixed>
Use this method to tell the server this plugin defines additional HTTP methods.
getPluginInfo()  : array<string|int, mixed>
Returns a bunch of meta-data about the plugin.
getPluginName()  : string
Returns a plugin name.
getSupportedReportSet()  : array<string|int, mixed>
Returns a list of reports this plugin supports.
httpGet()  : bool
Intercepts GET requests on calendar urls ending with ?export.
initialize()  : mixed
Initializes the plugin and registers event handlers.
mergeObjects()  : VCalendar
Merges all calendar objects, and builds one big iCalendar blob.
generateResponse()  : mixed
This method is responsible for generating the actual, full response.

Properties

Methods

getFeatures()

This method should return a list of server-features.

public getFeatures() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

getHTTPMethods()

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

public getHTTPMethods(string $path) : array<string|int, mixed>

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

Parameters
$path : string
Return values
array<string|int, mixed>

getPluginInfo()

Returns a bunch of meta-data about the plugin.

public getPluginInfo() : array<string|int, mixed>

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.

Return values
array<string|int, mixed>

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

Return values
string

getSupportedReportSet()

Returns a list of reports this plugin supports.

public getSupportedReportSet(string $uri) : array<string|int, mixed>

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
$uri : string
Return values
array<string|int, mixed>

initialize()

Initializes the plugin and registers event handlers.

public initialize(Server $server) : mixed
Parameters
$server : Server
Return values
mixed

mergeObjects()

Merges all calendar objects, and builds one big iCalendar blob.

public mergeObjects(array<string|int, mixed> $properties, array<string|int, mixed> $inputObjects) : VCalendar
Parameters
$properties : array<string|int, mixed>

Some CalDAV properties

$inputObjects : array<string|int, mixed>
Return values
VCalendar

generateResponse()

This method is responsible for generating the actual, full response.

protected generateResponse(string $path, DateTime|null $start, DateTime|null $end, bool $expand, string $componentType, string $format, array<string|int, mixed> $properties, ResponseInterface $response) : mixed
Parameters
$path : string
$start : DateTime|null
$end : DateTime|null
$expand : bool
$componentType : string
$format : string
$properties : array<string|int, mixed>
$response : ResponseInterface
Tags
throws
NotFound
throws
InvalidDataException
Return values
mixed

Search results