Documentation

CalendarObject extends File
in package
implements ICalendarObject, IACL Uses ACLTrait

The CalendarObject represents a single VEVENT or VTODO within a Calendar.

Tags
copyright

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

author

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

license

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

Interfaces, Classes and Traits

ICalendarObject
CalendarObject interface.
IACL
ACL-enabled node.

Table of Contents

$caldavBackend  : AbstractBackend
Sabre\CalDAV\Backend\BackendInterface.
$calendarInfo  : array<string|int, mixed>
Array with information about the containing calendar.
$objectData  : array<string|int, mixed>
Array with information about this CalendarObject.
__construct()  : mixed
Constructor.
delete()  : mixed
Deletes the calendar object.
get()  : string
Returns the ICalendar-formatted object.
getACL()  : array<string|int, mixed>
Returns a list of ACE's for this node.
getContentType()  : string
Returns the mime content-type.
getETag()  : string
Returns an ETag for this object.
getGroup()  : string|null
Returns a group principal.
getLastModified()  : int
Returns the last modification date as a unix timestamp.
getName()  : string
Returns the uri for this object.
getOwner()  : string|null
Returns the owner principal.
getSize()  : int
Returns the size of this object in bytes.
getSupportedPrivilegeSet()  : array<string|int, mixed>|null
Returns the list of supported privileges for this node.
put()  : string
Updates the ICalendar-formatted object.
setACL()  : mixed
Updates the ACL.
setName()  : mixed
Renames the node.

Properties

$calendarInfo

Array with information about the containing calendar.

protected array<string|int, mixed> $calendarInfo

$objectData

Array with information about this CalendarObject.

protected array<string|int, mixed> $objectData

Methods

__construct()

Constructor.

public __construct(BackendInterface $caldavBackend, array<string|int, mixed> $calendarInfo, array<string|int, mixed> $objectData) : mixed

The following properties may be passed within $objectData:

  • calendarid - This must refer to a calendarid from a caldavBackend
  • uri - A unique uri. Only the 'basename' must be passed.
  • calendardata (optional) - The iCalendar data
  • etag - (optional) The etag for this object, MUST be encloded with double-quotes.
  • size - (optional) The size of the data in bytes.
  • lastmodified - (optional) format as a unix timestamp.
  • acl - (optional) Use this to override the default ACL for the node.
Parameters
$caldavBackend : BackendInterface
$calendarInfo : array<string|int, mixed>
$objectData : array<string|int, mixed>
Return values
mixed

delete()

Deletes the calendar object.

public delete() : mixed
Return values
mixed

get()

Returns the ICalendar-formatted object.

public get() : string
Return values
string

getACL()

Returns a list of ACE's for this node.

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

Each ACE has the following properties:

  • 'privilege', a string such as {DAV:}read or {DAV:}write. These are currently the only supported privileges
  • 'principal', a url to the principal who owns the node
  • 'protected' (optional), indicating that this ACE is not allowed to be updated.
Return values
array<string|int, mixed>

getContentType()

Returns the mime content-type.

public getContentType() : string
Return values
string

getETag()

Returns an ETag for this object.

public getETag() : string

The ETag is an arbitrary string, but MUST be surrounded by double-quotes.

Return values
string

getGroup()

Returns a group principal.

public getGroup() : string|null

This must be a url to a principal, or null if there's no owner

Return values
string|null

getLastModified()

Returns the last modification date as a unix timestamp.

public getLastModified() : int
Return values
int

getName()

Returns the uri for this object.

public getName() : string
Return values
string

getOwner()

Returns the owner principal.

public getOwner() : string|null

This must be a url to a principal, or null if there's no owner

Return values
string|null

getSize()

Returns the size of this object in bytes.

public getSize() : int
Return values
int

getSupportedPrivilegeSet()

Returns the list of supported privileges for this node.

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

The returned data structure is a list of nested privileges. See Sabre\DAVACL\Plugin::getDefaultSupportedPrivilegeSet for a simple standard structure.

If null is returned from this method, the default privilege set is used, which is fine for most common usecases.

Return values
array<string|int, mixed>|null

put()

Updates the ICalendar-formatted object.

public put(string|resource $calendarData) : string
Parameters
$calendarData : string|resource
Return values
string

setACL()

Updates the ACL.

public setACL(array<string|int, mixed> $acl) : mixed

This method will receive a list of new ACE's as an array argument.

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

setName()

Renames the node.

public setName(string $name) : mixed
Parameters
$name : string

The new name

Tags
throws
Forbidden
Return values
mixed

Search results