Skip to content

Sabre VObject FreeBusyGenerator

Evert Pot edited this page Sep 1, 2014 · 5 revisions

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

Properties

$objects

protected array $objects

Input objects

  • Visibility: protected

$start

protected \Sabre\VObject\DateTime $start

Start of range

  • Visibility: protected

$end

protected \Sabre\VObject\DateTime $end

End of range

  • Visibility: protected

$baseObject

protected \Sabre\VObject\Component $baseObject

VCALENDAR object

  • Visibility: protected

Methods

__construct

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

Arguments

  • $start Sabre\VObject\DateTime
  • $end Sabre\VObject\DateTime
  • $objects mixed

setBaseObject

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

Arguments

setObjects

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

Arguments

  • $objects mixed

setTimeRange

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

Arguments

  • $start Sabre\VObject\DateTime
  • $end Sabre\VObject\DateTime

getResult

\Sabre\VObject\Component Sabre\VObject\FreeBusyGenerator::getResult()

Parses the input data and returns a correct VFREEBUSY object, wrapped in a VCALENDAR.

  • Visibility: public
Clone this wiki locally