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
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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