Skip to content

Sabre VObject RecurrenceIterator

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

Sabre\VObject\RecurrenceIterator

RecurrenceIterator

This class is deprecated. Use Sabre\VObject\Recur\EventIterator instead. This class will be removed from a future version.

  • Class name: RecurrenceIterator
  • Namespace: Sabre\VObject
  • Parent class: Sabre\VObject\Recur\EventIterator
  • Warning: this class is deprecated. This means that this class will likely be removed in a future version.

Properties

$recurIterator

protected \Sabre\VObject\Recur\RRuleIterator $recurIterator

RRULE parser

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$eventDuration

protected mixed $eventDuration

The duration, in seconds, of the master event.

We use this to calculate the DTEND for subsequent events.

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$masterEvent

protected \Sabre\VObject\Recur\VEVENT $masterEvent

A reference to the main (master) event.

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$overriddenEvents

protected array $overriddenEvents = array()

List of overridden events.

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$overriddenEventsIndex

protected array $overriddenEventsIndex

Overridden event index.

Key is timestamp, value is the index of the item in the $overriddenEvent property.

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$exceptions

protected array $exceptions = array()

A list of recurrence-id's that are either part of EXDATE, or are overridden.

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$counter

protected integer $counter

Internal event counter

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$startDate

protected \DateTime $startDate

The very start of the iteration process.

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$currentDate

protected \DateTime $currentDate

Where we are currently in the iteration process

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$nextDate

protected \DateTime $nextDate

The next date from the rrule parser.

Sometimes we need to temporary store the next date, because an overridden event came before.

  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

Methods

__construct

mixed Sabre\VObject\Recur\EventIterator::__construct(\Sabre\VObject\Component $vcal, string|null $uid)

Creates the iterator

You should pass a VCALENDAR component, as well as the UID of the event we're going to traverse.

Arguments

current

\DateTime Sabre\VObject\Recur\EventIterator::current()

Returns the date for the current position of the iterator.

getDtStart

\DateTime Sabre\VObject\Recur\EventIterator::getDtStart()

This method returns the start date for the current iteration of the event.

getDtEnd

\DateTime Sabre\VObject\Recur\EventIterator::getDtEnd()

This method returns the end date for the current iteration of the event.

getEventObject

\Sabre\VObject\Component\VEvent Sabre\VObject\Recur\EventIterator::getEventObject()

Returns a VEVENT for the current iterations of the event.

This VEVENT will have a recurrence id, and it's DTSTART and DTEND altered.

key

integer Sabre\VObject\Recur\EventIterator::key()

Returns the current position of the iterator.

This is for us simply a 0-based index.

valid

boolean Sabre\VObject\Recur\EventIterator::valid()

This is called after next, to see if the iterator is still at a valid position, or if it's at the end.

rewind

mixed Sabre\VObject\Recur\EventIterator::rewind()

Sets the iterator back to the starting point.

next

void Sabre\VObject\Recur\EventIterator::next()

Advances the iterator with one step.

fastForward

mixed Sabre\VObject\Recur\EventIterator::fastForward(\DateTime $dateTime)

Quickly jump to a date in the future.

Arguments

  • $dateTime DateTime

isInfinite

boolean Sabre\VObject\Recur\EventIterator::isInfinite()

Returns true if this recurring event never ends.

Clone this wiki locally