DAViCal
RepeatRule Class Reference

Public Member Functions

 __construct ( $basedate, $rrule, $is_date=null, $return_floating_times=false)
 
 hasLimitedOccurrences ()
 
 set_timezone ( $tzstring)
 
 Start ($return_floating_times=false)
 
 rewind ()
 
 next ($return_floating_times=false)
 
 current ($return_floating_times=false)
 
 key ($return_floating_times=false)
 
 valid ()
 

Static Public Member Functions

static rrule_day_number ( $day)
 
static date_mask ( $date, $y, $mo, $d, $h, $mi, $s)
 

Private Member Functions

 GetMoreInstances ($return_floating_times=false)
 
 expand_bymonth ()
 
 expand_bymonthday ()
 
 expand_byyearday ()
 
 expand_byday_in_week ( $day_in_week)
 
 expand_byday_in_month ( $day_in_month)
 
 expand_byday_in_year ( $day_in_year)
 
 expand_byday ()
 
 expand_byhour ()
 
 expand_byminute ()
 
 expand_bysecond ()
 
 limit_generally ( $fmt_char, $element_name)
 
 limit_byday ()
 
 limit_bymonth ()
 
 limit_byyearday ()
 
 limit_bymonthday ()
 
 limit_byhour ()
 
 limit_byminute ()
 
 limit_bysecond ()
 
 limit_bysetpos ()
 

Static Private Member Functions

static rrule_expand_limit ( $freq)
 

Private Attributes

 $base
 
 $until
 
 $freq
 
 $count
 
 $interval
 
 $bysecond
 
 $byminute
 
 $byhour
 
 $bymonthday
 
 $byyearday
 
 $byweekno
 
 $byday
 
 $bymonth
 
 $bysetpos
 
 $wkst
 
 $instances
 
 $position
 
 $finished
 
 $current_base
 
 $current_set
 
 $original_rule
 
 $frequency_string
 

Detailed Description

This class is an implementation of RRULE parsing and expansion, as per RFC5545. It should be reasonably complete, except that it does not handle changing the WKST - there may be a few errors in unusual rules also, but all of the common cases should be handled correctly.

Author
Andrew McMillan andre.nosp@m.w@mc.nosp@m.milla.nosp@m.n.ne.nosp@m.t.nz

Definition at line 615 of file RRule.php.

Constructor & Destructor Documentation

◆ __construct()

RepeatRule::__construct (   $basedate,
  $rrule,
  $is_date = null,
  $return_floating_times = false 
)

need to handle the error, but FREQ is mandatory so unlikely

Definition at line 641 of file RRule.php.

Member Function Documentation

◆ current()

RepeatRule::current (   $return_floating_times = false)

Definition at line 730 of file RRule.php.

◆ date_mask()

static RepeatRule::date_mask (   $date,
  $y,
  $mo,
  $d,
  $h,
  $mi,
  $s 
)
static

Definition at line 883 of file RRule.php.

◆ expand_byday()

RepeatRule::expand_byday ( )
private

Per RFC5545 3.3.10 from note 1&2 to table

Definition at line 1047 of file RRule.php.

◆ expand_byday_in_month()

RepeatRule::expand_byday_in_month (   $day_in_month)
private

Definition at line 965 of file RRule.php.

◆ expand_byday_in_week()

RepeatRule::expand_byday_in_week (   $day_in_week)
private
Todo:
This should really allow for WKST, since if we start a series on (eg.) TH and interval > 1, a MO, TU, FR repeat will not be in the same week with this code.

Definition at line 945 of file RRule.php.

◆ expand_byday_in_year()

RepeatRule::expand_byday_in_year (   $day_in_year)
private

Definition at line 1005 of file RRule.php.

◆ expand_byhour()

RepeatRule::expand_byhour ( )
private

Definition at line 1079 of file RRule.php.

◆ expand_byminute()

RepeatRule::expand_byminute ( )
private

Definition at line 1089 of file RRule.php.

◆ expand_bymonth()

RepeatRule::expand_bymonth ( )
private

Definition at line 902 of file RRule.php.

◆ expand_bymonthday()

RepeatRule::expand_bymonthday ( )
private

Definition at line 914 of file RRule.php.

◆ expand_bysecond()

RepeatRule::expand_bysecond ( )
private

Definition at line 1099 of file RRule.php.

◆ expand_byyearday()

RepeatRule::expand_byyearday ( )
private

Definition at line 930 of file RRule.php.

◆ GetMoreInstances()

RepeatRule::GetMoreInstances (   $return_floating_times = false)
private

Definition at line 813 of file RRule.php.

◆ hasLimitedOccurrences()

RepeatRule::hasLimitedOccurrences ( )

If this repeat rule has an UNTIL= or COUNT= then we can know it will end. Eventually.

Returns
boolean Whether or not one of these properties is present.

Definition at line 696 of file RRule.php.

◆ key()

RepeatRule::key (   $return_floating_times = false)

Definition at line 755 of file RRule.php.

◆ limit_byday()

RepeatRule::limit_byday ( )
private

Definition at line 1121 of file RRule.php.

◆ limit_byhour()

RepeatRule::limit_byhour ( )
private

Definition at line 1137 of file RRule.php.

◆ limit_byminute()

RepeatRule::limit_byminute ( )
private

Definition at line 1138 of file RRule.php.

◆ limit_bymonth()

RepeatRule::limit_bymonth ( )
private

Definition at line 1134 of file RRule.php.

◆ limit_bymonthday()

RepeatRule::limit_bymonthday ( )
private

Definition at line 1136 of file RRule.php.

◆ limit_bysecond()

RepeatRule::limit_bysecond ( )
private

Definition at line 1139 of file RRule.php.

◆ limit_bysetpos()

RepeatRule::limit_bysetpos ( )
private

Definition at line 1142 of file RRule.php.

◆ limit_byyearday()

RepeatRule::limit_byyearday ( )
private

Definition at line 1135 of file RRule.php.

◆ limit_generally()

RepeatRule::limit_generally (   $fmt_char,
  $element_name 
)
private

Definition at line 1110 of file RRule.php.

◆ next()

RepeatRule::next (   $return_floating_times = false)

Return the next date in the repeating series.

Parameters
boolean$return_floating_timesWhether to return dates as floating times.
Returns
vComponent The next instance.

Definition at line 724 of file RRule.php.

◆ rewind()

RepeatRule::rewind ( )

Definition at line 714 of file RRule.php.

◆ rrule_day_number()

static RepeatRule::rrule_day_number (   $day)
static

Definition at line 869 of file RRule.php.

◆ rrule_expand_limit()

static RepeatRule::rrule_expand_limit (   $freq)
staticprivate

This function returns an array which lists the order of processing, and whether the processing is to expand or limit based on this component.

Note that yearly-byday and monthly-byday have special handling which is coded within the expand_byday() method

Parameters
$freqa string indicating the frequency.

Definition at line 784 of file RRule.php.

◆ set_timezone()

RepeatRule::set_timezone (   $tzstring)

Definition at line 701 of file RRule.php.

◆ Start()

RepeatRule::Start (   $return_floating_times = false)

Definition at line 706 of file RRule.php.

◆ valid()

RepeatRule::valid ( )

Definition at line 765 of file RRule.php.

Member Data Documentation

◆ $base

RepeatRule::$base
private

Definition at line 617 of file RRule.php.

◆ $byday

RepeatRule::$byday
private

Definition at line 628 of file RRule.php.

◆ $byhour

RepeatRule::$byhour
private

Definition at line 624 of file RRule.php.

◆ $byminute

RepeatRule::$byminute
private

Definition at line 623 of file RRule.php.

◆ $bymonth

RepeatRule::$bymonth
private

Definition at line 629 of file RRule.php.

◆ $bymonthday

RepeatRule::$bymonthday
private

Definition at line 625 of file RRule.php.

◆ $bysecond

RepeatRule::$bysecond
private

Definition at line 622 of file RRule.php.

◆ $bysetpos

RepeatRule::$bysetpos
private

Definition at line 630 of file RRule.php.

◆ $byweekno

RepeatRule::$byweekno
private

Definition at line 627 of file RRule.php.

◆ $byyearday

RepeatRule::$byyearday
private

Definition at line 626 of file RRule.php.

◆ $count

RepeatRule::$count
private

Definition at line 620 of file RRule.php.

◆ $current_base

RepeatRule::$current_base
private

Definition at line 636 of file RRule.php.

◆ $current_set

RepeatRule::$current_set
private

Definition at line 637 of file RRule.php.

◆ $finished

RepeatRule::$finished
private

Definition at line 635 of file RRule.php.

◆ $freq

RepeatRule::$freq
private

Definition at line 619 of file RRule.php.

◆ $frequency_string

RepeatRule::$frequency_string
private

Definition at line 639 of file RRule.php.

◆ $instances

RepeatRule::$instances
private

Definition at line 633 of file RRule.php.

◆ $interval

RepeatRule::$interval
private

Definition at line 621 of file RRule.php.

◆ $original_rule

RepeatRule::$original_rule
private

Definition at line 638 of file RRule.php.

◆ $position

RepeatRule::$position
private

Definition at line 634 of file RRule.php.

◆ $until

RepeatRule::$until
private

Definition at line 618 of file RRule.php.

◆ $wkst

RepeatRule::$wkst
private

Definition at line 631 of file RRule.php.


The documentation for this class was generated from the following file: