ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\CalDAV\Backend\MockScheduling Class Reference
+ Inheritance diagram for Sabre\CalDAV\Backend\MockScheduling:
+ Collaboration diagram for Sabre\CalDAV\Backend\MockScheduling:

Public Member Functions

 getSchedulingObject ($principalUri, $objectUri)
 Returns a single scheduling object. More...
 
 getSchedulingObjects ($principalUri)
 Returns all scheduling objects for the inbox collection. More...
 
 deleteSchedulingObject ($principalUri, $objectUri)
 Deletes a scheduling object. More...
 
 createSchedulingObject ($principalUri, $objectUri, $objectData)
 Creates a new scheduling object. More...
 
- Public Member Functions inherited from Sabre\CalDAV\Backend\Mock
 __construct (array $calendars=[], array $calendarData=[])
 
 getCalendarsForUser ($principalUri)
 Returns a list of calendars for a principal. More...
 
 createCalendar ($principalUri, $calendarUri, array $properties)
 Creates a new calendar for a principal. More...
 
 updateCalendar ($calendarId, \Sabre\DAV\PropPatch $propPatch)
 Updates properties for a calendar. More...
 
 deleteCalendar ($calendarId)
 Delete a calendar and all it's objects. More...
 
 getCalendarObjects ($calendarId)
 Returns all calendar objects within a calendar object. More...
 
 getCalendarObject ($calendarId, $objectUri)
 Returns information from a single calendar object, based on it's object uri. More...
 
 createCalendarObject ($calendarId, $objectUri, $calendarData)
 Creates a new calendar object. More...
 
 updateCalendarObject ($calendarId, $objectUri, $calendarData)
 Updates an existing calendarobject, based on it's uri. More...
 
 deleteCalendarObject ($calendarId, $objectUri)
 Deletes an existing calendar object. More...
 
- Public Member Functions inherited from Sabre\CalDAV\Backend\AbstractBackend
 updateCalendar ($calendarId, \Sabre\DAV\PropPatch $propPatch)
 Updates properties for a calendar. More...
 
 getMultipleCalendarObjects ($calendarId, array $uris)
 Returns a list of calendar objects. More...
 
 calendarQuery ($calendarId, array $filters)
 Performs a calendar-query on the contents of this calendar. More...
 
 getCalendarObjectByUID ($principalUri, $uid)
 Searches through all of a users calendars and calendar objects to find an object with a specific UID. More...
 

Data Fields

 $schedulingObjects = []
 

Additional Inherited Members

- Protected Member Functions inherited from Sabre\CalDAV\Backend\AbstractBackend
 validateFilterForObject (array $object, array $filters)
 This method validates if a filter (as passed to calendarQuery) matches the given object. More...
 
- Protected Attributes inherited from Sabre\CalDAV\Backend\Mock
 $calendarData
 
 $calendars
 

Detailed Description

Definition at line 5 of file MockScheduling.php.

Member Function Documentation

◆ createSchedulingObject()

Sabre\CalDAV\Backend\MockScheduling::createSchedulingObject (   $principalUri,
  $objectUri,
  $objectData 
)

Creates a new scheduling object.

This should land in a users' inbox.

Parameters
string$principalUri
string$objectUri
string$objectData,;
Returns
void

Implements Sabre\CalDAV\Backend\SchedulingSupport.

Definition at line 76 of file MockScheduling.php.

76  {
77 
78  if (!isset($this->schedulingObjects[$principalUri])) {
79  $this->schedulingObjects[$principalUri] = [];
80  }
81  $this->schedulingObjects[$principalUri][$objectUri] = [
82  'uri' => $objectUri,
83  'calendardata' => $objectData,
84  'lastmodified' => null,
85  'etag' => '"' . md5($objectData) . '"',
86  'size' => strlen($objectData)
87  ];
88 
89  }

◆ deleteSchedulingObject()

Sabre\CalDAV\Backend\MockScheduling::deleteSchedulingObject (   $principalUri,
  $objectUri 
)

Deletes a scheduling object.

Parameters
string$principalUri
string$objectUri
Returns
void

Implements Sabre\CalDAV\Backend\SchedulingSupport.

Definition at line 60 of file MockScheduling.php.

60  {
61 
62  if (isset($this->schedulingObjects[$principalUri][$objectUri])) {
63  unset($this->schedulingObjects[$principalUri][$objectUri]);
64  }
65 
66  }

◆ getSchedulingObject()

Sabre\CalDAV\Backend\MockScheduling::getSchedulingObject (   $principalUri,
  $objectUri 
)

Returns a single scheduling object.

The returned array should contain the following elements:

  • uri - A unique basename for the object. This will be used to construct a full uri.
  • calendardata - The iCalendar object
  • lastmodified - The last modification date. Can be an int for a unix timestamp, or a PHP DateTime object.
  • etag - A unique token that must change if the object changed.
  • size - The size of the object, in bytes.
Parameters
string$principalUri
string$objectUri
Returns
array

Implements Sabre\CalDAV\Backend\SchedulingSupport.

Definition at line 25 of file MockScheduling.php.

25  {
26 
27  if (isset($this->schedulingObjects[$principalUri][$objectUri])) {
28  return $this->schedulingObjects[$principalUri][$objectUri];
29  }
30 
31  }

◆ getSchedulingObjects()

Sabre\CalDAV\Backend\MockScheduling::getSchedulingObjects (   $principalUri)

Returns all scheduling objects for the inbox collection.

These objects should be returned as an array. Every item in the array should follow the same structure as returned from getSchedulingObject.

The main difference is that 'calendardata' is optional.

Parameters
string$principalUri
Returns
array

Implements Sabre\CalDAV\Backend\SchedulingSupport.

Definition at line 44 of file MockScheduling.php.

44  {
45 
46  if (isset($this->schedulingObjects[$principalUri])) {
47  return array_values($this->schedulingObjects[$principalUri]);
48  }
49  return [];
50 
51  }

Field Documentation

◆ $schedulingObjects

Sabre\CalDAV\Backend\MockScheduling::$schedulingObjects = []

Definition at line 7 of file MockScheduling.php.


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