ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\CalDAV\Schedule\SchedulingObject Class Reference

The SchedulingObject represents a scheduling object in the Inbox collection. More...

+ Inheritance diagram for Sabre\CalDAV\Schedule\SchedulingObject:
+ Collaboration diagram for Sabre\CalDAV\Schedule\SchedulingObject:

Public Member Functions

 __construct (Backend\SchedulingSupport $caldavBackend, array $objectData)
 Constructor. More...
 
 get ()
 Returns the ICalendar-formatted object. More...
 
 put ($calendarData)
 Updates the ICalendar-formatted object. More...
 
 delete ()
 Deletes the scheduling message. More...
 
 getOwner ()
 Returns the owner principal. More...
 
 getACL ()
 Returns a list of ACE's for this node. More...
 
- Public Member Functions inherited from Sabre\CalDAV\CalendarObject
 __construct (Backend\BackendInterface $caldavBackend, array $calendarInfo, array $objectData)
 Constructor. More...
 
 getName ()
 Returns the uri for this object. More...
 
 get ()
 Returns the ICalendar-formatted object. More...
 
 put ($calendarData)
 Updates the ICalendar-formatted object. More...
 
 delete ()
 Deletes the calendar object. More...
 
 getContentType ()
 Returns the mime content-type. More...
 
 getETag ()
 Returns an ETag for this object. More...
 
 getLastModified ()
 Returns the last modification date as a unix timestamp. More...
 
 getSize ()
 Returns the size of this object in bytes. More...
 
 getOwner ()
 Returns the owner principal. More...
 
 getACL ()
 Returns a list of ACE's for this node. More...
 
 put ($data)
 Replaces the contents of the file. More...
 
 get ()
 Returns the data. More...
 
 getSize ()
 Returns the size of the file, in bytes. More...
 
 getETag ()
 Returns the ETag for a file. More...
 
 getContentType ()
 Returns the mime-type for a file. More...
 
- Public Member Functions inherited from Sabre\DAV\Node
 getLastModified ()
 Returns the last modification time as a unix timestamp. More...
 
 delete ()
 Deletes the current node. More...
 
 setName ($name)
 Renames the node. More...
 
 delete ()
 Deleted the current node. More...
 
 getName ()
 Returns the name of the node. More...
 
 setName ($name)
 Renames the node. More...
 
 getLastModified ()
 Returns the last modification time, as a unix timestamp. More...
 
 put ($data)
 Replaces the contents of the file. More...
 
 get ()
 Returns the data. More...
 
 getContentType ()
 Returns the mime-type for a file. More...
 
 getETag ()
 Returns the ETag for a file. More...
 
 getSize ()
 Returns the size of the node, in bytes. More...
 
- Public Member Functions inherited from Sabre\DAVACL\IACL
 getOwner ()
 Returns the owner principal. More...
 
 getGroup ()
 Returns a group principal. More...
 
 getACL ()
 Returns a list of ACE's for this node. More...
 
 setACL (array $acl)
 Updates the ACL. More...
 
 getSupportedPrivilegeSet ()
 Returns the list of supported privileges for this node. More...
 

Protected Attributes

 $caldavBackend
 
 $objectData
 
- Protected Attributes inherited from Sabre\CalDAV\CalendarObject
 $caldavBackend
 
 $objectData
 
 $calendarInfo
 

Detailed Description

The SchedulingObject represents a scheduling object in the Inbox collection.

Author
Brett (https://github.com/bretten) @license http://sabre.io/license/ Modified BSD License

Definition at line 15 of file SchedulingObject.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\CalDAV\Schedule\SchedulingObject::__construct ( Backend\SchedulingSupport  $caldavBackend,
array  $objectData 
)

Constructor.

The following properties may be passed within $objectData:

  • uri - A unique uri. Only the 'basename' must be passed.
  • principaluri - the principal that owns the object.
  • 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
Backend\SchedulingSupport$caldavBackend
array$objectData

Definition at line 48 of file SchedulingObject.php.

48 {
49
50 $this->caldavBackend = $caldavBackend;
51
52 if (!isset($objectData['uri'])) {
53 throw new \InvalidArgumentException('The objectData argument must contain an \'uri\' property');
54 }
55
56 $this->objectData = $objectData;
57
58 }

References Sabre\CalDAV\Schedule\SchedulingObject\$caldavBackend, and Sabre\CalDAV\Schedule\SchedulingObject\$objectData.

Member Function Documentation

◆ delete()

Sabre\CalDAV\Schedule\SchedulingObject::delete ( )

Deletes the scheduling message.

Returns
void

Reimplemented from Sabre\CalDAV\CalendarObject.

Definition at line 93 of file SchedulingObject.php.

93 {
94
95 $this->caldavBackend->deleteSchedulingObject($this->objectData['principaluri'], $this->objectData['uri']);
96
97 }

◆ get()

Sabre\CalDAV\Schedule\SchedulingObject::get ( )

Returns the ICalendar-formatted object.

Returns
string

Reimplemented from Sabre\CalDAV\CalendarObject.

Definition at line 65 of file SchedulingObject.php.

65 {
66
67 // Pre-populating the 'calendardata' is optional, if we don't have it
68 // already we fetch it from the backend.
69 if (!isset($this->objectData['calendardata'])) {
70 $this->objectData = $this->caldavBackend->getSchedulingObject($this->objectData['principaluri'], $this->objectData['uri']);
71 }
72 return $this->objectData['calendardata'];
73
74 }

◆ getACL()

Sabre\CalDAV\Schedule\SchedulingObject::getACL ( )

Returns a list of ACE's for this node.

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.
Returns
array

Reimplemented from Sabre\CalDAV\CalendarObject.

Definition at line 125 of file SchedulingObject.php.

125 {
126
127 // An alternative acl may be specified in the object data.
128 //
129
130 if (isset($this->objectData['acl'])) {
131 return $this->objectData['acl'];
132 }
133
134 // The default ACL
135 return [
136 [
137 'privilege' => '{DAV:}all',
138 'principal' => '{DAV:}owner',
139 'protected' => true,
140 ],
141 [
142 'privilege' => '{DAV:}all',
143 'principal' => $this->objectData['principaluri'] . '/calendar-proxy-write',
144 'protected' => true,
145 ],
146 [
147 'privilege' => '{DAV:}read',
148 'principal' => $this->objectData['principaluri'] . '/calendar-proxy-read',
149 'protected' => true,
150 ],
151 ];
152
153 }

◆ getOwner()

Sabre\CalDAV\Schedule\SchedulingObject::getOwner ( )

Returns the owner principal.

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

Returns
string|null

Reimplemented from Sabre\CalDAV\CalendarObject.

Definition at line 106 of file SchedulingObject.php.

106 {
107
108 return $this->objectData['principaluri'];
109
110 }

◆ put()

Sabre\CalDAV\Schedule\SchedulingObject::put (   $calendarData)

Updates the ICalendar-formatted object.

Parameters
string | resource$calendarData
Returns
string

Reimplemented from Sabre\CalDAV\CalendarObject.

Definition at line 82 of file SchedulingObject.php.

82 {
83
84 throw new MethodNotAllowed('Updating scheduling objects is not supported');
85
86 }

Field Documentation

◆ $caldavBackend

Sabre\CalDAV\Schedule\SchedulingObject::$caldavBackend
protected

◆ $objectData

Sabre\CalDAV\Schedule\SchedulingObject::$objectData
protected

The documentation for this class was generated from the following file: