PHP Класс Sabre\VObject\Recur\EventIterator

This iterator may loop infinitely in the future, therefore it is important that if you use this class, you set hard limits for the amount of iterations you want to handle. Note that currently there is not full support for the entire iCalendar specification, as it's very complex and contains a lot of permutations that's not yet used very often in software. For the focus has been on features as they actually appear in Calendaring software, but this may well get expanded as needed / on demand The following RRULE properties are supported * UNTIL * INTERVAL * COUNT * FREQ=DAILY * BYDAY * BYHOUR * BYMONTH * FREQ=WEEKLY * BYDAY * BYHOUR * WKST * FREQ=MONTHLY * BYMONTHDAY * BYDAY * BYSETPOS * FREQ=YEARLY * BYMONTH * BYMONTHDAY (only if BYMONTH is also set) * BYDAY (only if BYMONTH is also set) Anything beyond this is 'undefined', which means that it may get ignored, or you may get unexpected results. The effect is that in some applications the specified recurrence may look incorrect, or is missing. The recurrence iterator also does not yet support THISANDFUTURE.
Автор: Evert Pot (http://evertpot.com/)
Наследование: implements Iterator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$allDay boolean True if we're iterating an all-day event.
$counter integer Internal event counter
$currentDate DateTime Where we are currently in the iteration process
$eventDuration We use this to calculate the DTEND for subsequent events.
$exceptions array A list of recurrence-id's that are either part of EXDATE, or are overridden.
$masterEvent VEVENT A reference to the main (master) event.
$nextDate DateTime Sometimes we need to temporary store the next date, because an overridden event came before.
$overriddenEvents array List of overridden events.
$overriddenEventsIndex array Key is timestamp, value is the index of the item in the $overriddenEvent property.
$recurIterator Sabre\VObject\Recur\RRuleIterator RRULE parser
$startDate DateTime The very start of the iteration process.
$timeZone DateTimeZone Reference timeZone for floating dates and times.

Открытые методы

Метод Описание
__construct ( Sabre\VObject\Component | array $input, string | null $uid = null, DateTimeZone $timeZone = null ) Creates the iterator
current ( ) : DateTime Returns the date for the current position of the iterator.
fastForward ( DateTime $dateTime ) Quickly jump to a date in the future.
getDtEnd ( ) : DateTime This method returns the end date for the current iteration of the event.
getDtStart ( ) : DateTime This method returns the start date for the current iteration of the event.
getEventObject ( ) : Sabre\VObject\Component\VEvent Returns a VEVENT for the current iterations of the event.
isInfinite ( ) : boolean Returns true if this recurring event never ends.
key ( ) : integer Returns the current position of the iterator.
next ( ) : void Advances the iterator with one step.
rewind ( ) Sets the iterator back to the starting point.
valid ( ) : boolean This is called after next, to see if the iterator is still at a valid position, or if it's at the end.

Описание методов

__construct() публичный Метод

There's three ways to set up the iterator. 1. You can pass a VCALENDAR component and a UID. 2. You can pass an array of VEVENTs (all UIDS should match). 3. You can pass a single VEVENT component. Only the second method is recomended. The other 1 and 3 will be removed at some point in the future. The $uid parameter is only required for the first method.
public __construct ( Sabre\VObject\Component | array $input, string | null $uid = null, DateTimeZone $timeZone = null )
$input Sabre\VObject\Component | array
$uid string | null
$timeZone DateTimeZone Reference timezone for floating dates and times.

current() публичный Метод

Returns the date for the current position of the iterator.
public current ( ) : DateTime
Результат DateTime

fastForward() публичный Метод

Quickly jump to a date in the future.
public fastForward ( DateTime $dateTime )
$dateTime DateTime

getDtEnd() публичный Метод

This method returns the end date for the current iteration of the event.
public getDtEnd ( ) : DateTime
Результат DateTime

getDtStart() публичный Метод

This method returns the start date for the current iteration of the event.
public getDtStart ( ) : DateTime
Результат DateTime

getEventObject() публичный Метод

This VEVENT will have a recurrence id, and it's DTSTART and DTEND altered.
public getEventObject ( ) : Sabre\VObject\Component\VEvent
Результат Sabre\VObject\Component\VEvent

isInfinite() публичный Метод

Returns true if this recurring event never ends.
public isInfinite ( ) : boolean
Результат boolean

key() публичный Метод

This is for us simply a 0-based index.
public key ( ) : integer
Результат integer

next() публичный Метод

Advances the iterator with one step.
public next ( ) : void
Результат void

rewind() публичный Метод

Sets the iterator back to the starting point.
public rewind ( )

valid() публичный Метод

This is called after next, to see if the iterator is still at a valid position, or if it's at the end.
public valid ( ) : boolean
Результат boolean

Описание свойств

$allDay защищенное свойство

True if we're iterating an all-day event.
protected bool $allDay
Результат boolean

$counter защищенное свойство

Internal event counter
protected int $counter
Результат integer

$currentDate защищенное свойство

Where we are currently in the iteration process
protected DateTime $currentDate
Результат DateTime

$eventDuration защищенное свойство

We use this to calculate the DTEND for subsequent events.
protected $eventDuration

$exceptions защищенное свойство

A list of recurrence-id's that are either part of EXDATE, or are overridden.
protected array $exceptions
Результат array

$masterEvent защищенное свойство

A reference to the main (master) event.
protected VEVENT $masterEvent
Результат VEVENT

$nextDate защищенное свойство

Sometimes we need to temporary store the next date, because an overridden event came before.
protected DateTime $nextDate
Результат DateTime

$overriddenEvents защищенное свойство

List of overridden events.
protected array $overriddenEvents
Результат array

$overriddenEventsIndex защищенное свойство

Key is timestamp, value is the index of the item in the $overriddenEvent property.
protected array $overriddenEventsIndex
Результат array

$recurIterator защищенное свойство

RRULE parser
protected RRuleIterator,Sabre\VObject\Recur $recurIterator
Результат Sabre\VObject\Recur\RRuleIterator

$startDate защищенное свойство

The very start of the iteration process.
protected DateTime $startDate
Результат DateTime

$timeZone защищенное свойство

Reference timeZone for floating dates and times.
protected DateTimeZone $timeZone
Результат DateTimeZone