-
Notifications
You must be signed in to change notification settings - Fork 129
Sabre VObject FreeBusyGenerator
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.
- Class name: FreeBusyGenerator
- Namespace: Sabre\VObject
protected array $objects
Input objects
- Visibility: protected
protected \Sabre\VObject\DateTime $start
Start of range
- Visibility: protected
protected \Sabre\VObject\DateTime $end
End of range
- Visibility: protected
protected \Sabre\VObject\Component $baseObject
VCALENDAR object
- Visibility: protected
void Sabre\VObject\FreeBusyGenerator::__construct(\Sabre\VObject\DateTime $start, \Sabre\VObject\DateTime $end, mixed $objects)
Creates the generator.
Check the setTimeRange and setObjects methods for details about the arguments.
- Visibility: public
- $start Sabre\VObject\DateTime
- $end Sabre\VObject\DateTime
- $objects mixed
void Sabre\VObject\FreeBusyGenerator::setBaseObject(\Sabre\VObject\Component $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.
- Visibility: public
- $vcalendar Sabre\VObject\Component
void Sabre\VObject\FreeBusyGenerator::setObjects(mixed $objects)
Sets the input objects
You must either specify a valendar object as a strong, or as the parse Component. It's also possible to specify multiple objects as an array.
- Visibility: public
- $objects mixed
void Sabre\VObject\FreeBusyGenerator::setTimeRange(\Sabre\VObject\DateTime $start, \Sabre\VObject\DateTime $end)
Sets the time range
Any freebusy object falling outside of this time range will be ignored.
- Visibility: public
- $start Sabre\VObject\DateTime
- $end Sabre\VObject\DateTime
\Sabre\VObject\Component Sabre\VObject\FreeBusyGenerator::getResult()
Parses the input data and returns a correct VFREEBUSY object, wrapped in a VCALENDAR.
- Visibility: public