CalendarHome
in package
implements
IExtendedCollection, IACL
Uses
ACLTrait
The CalendarHome represents a node that is usually in a users' calendar-homeset.
It contains all the users' calendars, and can optionally contain a notifications collection, calendar subscriptions, a users' inbox, and a users' outbox.
Tags
Interfaces, Classes and Traits
- IExtendedCollection
- The IExtendedCollection interface.
- IACL
- ACL-enabled node.
Table of Contents
- $caldavBackend : BackendInterface
- CalDAV backend.
- $principalInfo : array<string|int, mixed>
- Principal information.
- __construct() : mixed
- Constructor.
- childExists() : bool
- Checks if a calendar exists.
- createDirectory() : mixed
- Creates a new directory under this object.
- createExtendedCollection() : mixed
- Creates a new calendar or subscription.
- createFile() : mixed
- Creates a new file under this object.
- delete() : mixed
- Deletes this object.
- getACL() : array<string|int, mixed>
- Returns a list of ACE's for this node.
- getCalendarObjectByUID() : string|null
- Searches through all of a users calendars and calendar objects to find an object with a specific UID.
- getChild() : Calendar
- Returns a single calendar, by name.
- getChildren() : array<string|int, mixed>
- Returns a list of calendars.
- getGroup() : string|null
- Returns a group principal.
- getLastModified() : int
- Returns the last modification date.
- getName() : string
- Returns the name of this object.
- getOwner() : string
- Returns the owner of the calendar home.
- getSupportedPrivilegeSet() : array<string|int, mixed>|null
- Returns the list of supported privileges for this node.
- setACL() : mixed
- Updates the ACL.
- setName() : mixed
- Updates the name of this object.
- shareReply() : string|null
- This method is called when a user replied to a request to share.
Properties
$caldavBackend
CalDAV backend.
protected
BackendInterface
$caldavBackend
$principalInfo
Principal information.
protected
array<string|int, mixed>
$principalInfo
Methods
__construct()
Constructor.
public
__construct(BackendInterface $caldavBackend, array<string|int, mixed> $principalInfo) : mixed
Parameters
- $caldavBackend : BackendInterface
- $principalInfo : array<string|int, mixed>
Return values
mixed —childExists()
Checks if a calendar exists.
public
childExists(string $name) : bool
Parameters
- $name : string
Return values
bool —createDirectory()
Creates a new directory under this object.
public
createDirectory(string $filename) : mixed
This is currently not allowed.
Parameters
- $filename : string
Return values
mixed —createExtendedCollection()
Creates a new calendar or subscription.
public
createExtendedCollection(string $name, MkCol $mkCol) : mixed
Parameters
- $name : string
- $mkCol : MkCol
Tags
Return values
mixed —createFile()
Creates a new file under this object.
public
createFile(string $filename[, resource $data = null ]) : mixed
This is currently not allowed
Parameters
- $filename : string
- $data : resource = null
Return values
mixed —delete()
Deletes this object.
public
delete() : mixed
Return values
mixed —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> —getCalendarObjectByUID()
Searches through all of a users calendars and calendar objects to find an object with a specific UID.
public
getCalendarObjectByUID(string $uid) : string|null
This method should return the path to this object, relative to the calendar home, so this path usually only contains two parts:
calendarpath/objectpath.ics
If the uid is not found, return null.
This method should only consider * objects that the principal owns, so any calendars owned by other principals that also appear in this collection should be ignored.
Parameters
- $uid : string
Return values
string|null —getChild()
Returns a single calendar, by name.
public
getChild(string $name) : Calendar
Parameters
- $name : string
Return values
Calendar —getChildren()
Returns a list of calendars.
public
getChildren() : array<string|int, mixed>
Return values
array<string|int, mixed> —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.
public
getLastModified() : int
Return values
int —getName()
Returns the name of this object.
public
getName() : string
Return values
string —getOwner()
Returns the owner of the calendar home.
public
getOwner() : string
Return values
string —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 —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()
Updates the name of this object.
public
setName(string $name) : mixed
Parameters
- $name : string
Return values
mixed —shareReply()
This method is called when a user replied to a request to share.
public
shareReply(string $href, int $status, string $calendarUri, string $inReplyTo[, string $summary = null ]) : string|null
This method should return the url of the newly created calendar if the share was accepted.
Parameters
- $href : string
-
The sharee who is replying (often a mailto: address)
- $status : int
-
One of the SharingPlugin::STATUS_* constants
- $calendarUri : string
-
The url to the calendar thats being shared
- $inReplyTo : string
-
The unique id this message is a response to
- $summary : string = null
-
A description of the reply