ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This class helps with generating FREEBUSY reports based on existing sets of objects. More...
Public Member Functions | |
__construct (DateTimeInterface $start=null, DateTimeInterface $end=null, $objects=null, DateTimeZone $timeZone=null) | |
Creates the generator. More... | |
setBaseObject (Document $vcalendar) | |
Sets the VCALENDAR object. More... | |
setVAvailability (Document $vcalendar) | |
Sets a VAVAILABILITY document. More... | |
setObjects ($objects) | |
Sets the input objects. More... | |
setTimeRange (DateTimeInterface $start=null, DateTimeInterface $end=null) | |
Sets the time range. More... | |
setTimeZone (DateTimeZone $timeZone) | |
Sets the reference timezone for floating times. More... | |
getResult () | |
Parses the input data and returns a correct VFREEBUSY object, wrapped in a VCALENDAR. More... | |
Protected Member Functions | |
calculateAvailability (FreeBusyData $fbData, VCalendar $vavailability) | |
This method takes a VAVAILABILITY component and figures out all the available times. More... | |
calculateBusy (FreeBusyData $fbData, array $objects) | |
This method takes an array of iCalendar objects and applies its busy times on fbData. More... | |
generateFreeBusyCalendar (FreeBusyData $fbData) | |
This method takes a FreeBusyData object and generates the VCALENDAR object associated with it. More... | |
Protected Attributes | |
$objects = [] | |
$start | |
$end | |
$baseObject | |
$timeZone | |
$vavailability | |
This class helps with generating FREEBUSY reports based on existing sets of objects.
It only looks at VEVENT and VFREEBUSY objects from the sourcedata, and generates a single VFREEBUSY object.
VFREEBUSY components are described in RFC5545, The rules for what should go in a single freebusy report is taken from RFC4791, section 7.10.
Definition at line 26 of file FreeBusyGenerator.php.
Sabre\VObject\FreeBusyGenerator::__construct | ( | DateTimeInterface | $start = null , |
DateTimeInterface | $end = null , |
||
$objects = null , |
|||
DateTimeZone | $timeZone = null |
||
) |
Creates the generator.
Check the setTimeRange and setObjects methods for details about the arguments.
DateTimeInterface | $start | |
DateTimeInterface | $end | |
mixed | $objects | |
DateTimeZone | $timeZone |
Definition at line 92 of file FreeBusyGenerator.php.
References Sabre\VObject\FreeBusyGenerator\$end, Sabre\VObject\FreeBusyGenerator\$objects, Sabre\VObject\FreeBusyGenerator\$start, Sabre\VObject\FreeBusyGenerator\$timeZone, Sabre\VObject\FreeBusyGenerator\setObjects(), Sabre\VObject\FreeBusyGenerator\setTimeRange(), and Sabre\VObject\FreeBusyGenerator\setTimeZone().
|
protected |
This method takes a VAVAILABILITY component and figures out all the available times.
FreeBusyData | $fbData | |
VCalendar | $vavailability |
Definition at line 236 of file FreeBusyGenerator.php.
References Sabre\VObject\FreeBusyGenerator\$end, Sabre\VObject\FreeBusyGenerator\$start, Sabre\VObject\FreeBusyData\add(), and Sabre\VObject\Recur\RRuleIterator\fastForward().
Referenced by Sabre\VObject\FreeBusyGenerator\getResult().
|
protected |
This method takes an array of iCalendar objects and applies its busy times on fbData.
FreeBusyData | $fbData | |
VCalendar[] | $objects |
Definition at line 399 of file FreeBusyGenerator.php.
References $key, Sabre\VObject\Settings\$maxRecurrences, $time, $values, Sabre\VObject\FreeBusyData\add(), Sabre\VObject\DateTimeParser\parseDateTime(), and Sabre\VObject\DateTimeParser\parseDuration().
Referenced by Sabre\VObject\FreeBusyGenerator\getResult().
|
protected |
This method takes a FreeBusyData object and generates the VCALENDAR object associated with it.
Definition at line 546 of file FreeBusyGenerator.php.
References Sabre\VObject\FreeBusyGenerator\$baseObject, $calendar, $tz, and Sabre\VObject\FreeBusyData\getData().
Referenced by Sabre\VObject\FreeBusyGenerator\getResult().
Sabre\VObject\FreeBusyGenerator::getResult | ( | ) |
Parses the input data and returns a correct VFREEBUSY object, wrapped in a VCALENDAR.
Definition at line 209 of file FreeBusyGenerator.php.
References Sabre\VObject\FreeBusyGenerator\calculateAvailability(), Sabre\VObject\FreeBusyGenerator\calculateBusy(), and Sabre\VObject\FreeBusyGenerator\generateFreeBusyCalendar().
Sabre\VObject\FreeBusyGenerator::setBaseObject | ( | Document | $vcalendar | ) |
Sets the VCALENDAR object.
If this is set, it will not be generated for you. You are responsible for setting things like the METHOD, CALSCALE, VERSION, etc..
The VFREEBUSY object will be automatically added though.
Document | $vcalendar |
Definition at line 117 of file FreeBusyGenerator.php.
Sabre\VObject\FreeBusyGenerator::setObjects | ( | $objects | ) |
Sets the input objects.
You must either specify a valendar object as a string, or as the parse Component. It's also possible to specify multiple objects as an array.
mixed | $objects |
Definition at line 146 of file FreeBusyGenerator.php.
References Sabre\VObject\FreeBusyGenerator\$objects, and Sabre\VObject\Reader\read().
Referenced by Sabre\VObject\FreeBusyGenerator\__construct().
Sabre\VObject\FreeBusyGenerator::setTimeRange | ( | DateTimeInterface | $start = null , |
DateTimeInterface | $end = null |
||
) |
Sets the time range.
Any freebusy object falling outside of this time range will be ignored.
DateTimeInterface | $start | |
DateTimeInterface | $end |
Definition at line 177 of file FreeBusyGenerator.php.
References Sabre\VObject\FreeBusyGenerator\$end, Sabre\VObject\Settings\$maxDate, Sabre\VObject\Settings\$minDate, and Sabre\VObject\FreeBusyGenerator\$start.
Referenced by Sabre\VObject\FreeBusyGenerator\__construct().
Sabre\VObject\FreeBusyGenerator::setTimeZone | ( | DateTimeZone | $timeZone | ) |
Sets the reference timezone for floating times.
DateTimeZone | $timeZone |
Definition at line 197 of file FreeBusyGenerator.php.
References Sabre\VObject\FreeBusyGenerator\$timeZone.
Referenced by Sabre\VObject\FreeBusyGenerator\__construct().
Sabre\VObject\FreeBusyGenerator::setVAvailability | ( | Document | $vcalendar | ) |
Sets a VAVAILABILITY document.
Document | $vcalendar |
Definition at line 129 of file FreeBusyGenerator.php.
|
protected |
Definition at line 54 of file FreeBusyGenerator.php.
Referenced by Sabre\VObject\FreeBusyGenerator\generateFreeBusyCalendar().
|
protected |
Definition at line 47 of file FreeBusyGenerator.php.
Referenced by Sabre\VObject\FreeBusyGenerator\__construct(), Sabre\VObject\FreeBusyGenerator\calculateAvailability(), and Sabre\VObject\FreeBusyGenerator\setTimeRange().
|
protected |
Definition at line 33 of file FreeBusyGenerator.php.
Referenced by Sabre\VObject\FreeBusyGenerator\__construct(), and Sabre\VObject\FreeBusyGenerator\setObjects().
|
protected |
Definition at line 40 of file FreeBusyGenerator.php.
Referenced by Sabre\VObject\FreeBusyGenerator\__construct(), Sabre\VObject\FreeBusyGenerator\calculateAvailability(), and Sabre\VObject\FreeBusyGenerator\setTimeRange().
|
protected |
Definition at line 69 of file FreeBusyGenerator.php.
Referenced by Sabre\VObject\FreeBusyGenerator\__construct(), and Sabre\VObject\FreeBusyGenerator\setTimeZone().
|
protected |
Definition at line 79 of file FreeBusyGenerator.php.