__construct |
$files = false, $options = array() |
public |
Creates the ICal object |
initFile |
$file |
protected |
Initialises lines from a file |
initLines |
$lines |
protected |
Initialises the parser using an array containing each line of iCal content |
initString |
$string |
protected |
Initialises lines from a string |
initUrl |
$url |
protected |
Initialises lines from a URL |
addCalendarComponentWithKeyAndValue |
$component, $keyword, $value |
protected |
Add one key and value pair to the $this->cal array |
cleanData |
$data |
protected |
Replaces curly quotes and other special characters with their standard equivalents |
convertDayOrdinalToPositive |
$dayNumber, $weekday, $timestamp |
protected |
Converts a negative day ordinal to its equivalent positive form |
fileOrUrl |
$filename |
protected |
Reads an entire file or URL into an array |
isExdateMatch |
$exdate, $anEvent, $recurringOffset |
protected |
Checks if an excluded date matches a given date by reconciling time zones |
isFileOrUrl |
$filename |
protected |
Checks if a filename exists as a file or URL |
isValidTimeZoneId |
$timeZone |
protected |
Checks if a time zone is valid |
keyValueFromString |
$text |
protected |
Gets the key value pair from an iCal string |
mb_chr |
$code |
protected |
Provides a polyfill for PHP 7.2's mb_chr(), which is a multibyte safe version of chr() |
mb_str_replace |
$search, $replace, $subject, $count = 0 |
protected |
Replaces all occurrences of a search string with a given replacement string |
numberOfDays |
$days, $start, $end |
protected |
Gets the number of days between a start and end date |
parseDuration |
$date, $duration, $format = 'U' |
protected |
Parses a duration and applies it to a date |
processDateConversions |
- |
protected |
Processes date conversions using the time zone |
processEventIcalDate |
$event, $index = 3 |
protected |
Extends the {DTSTART|DTEND|RECURRENCE-ID}_array array to include an iCal date time for each event |
processEvents |
- |
protected |
Performs admin tasks on all events as read from the iCal file |
processRecurrences |
- |
protected |
Processes recurrence rules |
removeUnprintableChars |
$data |
protected |
Removes unprintable ASCII and UTF-8 characters |
trimToRecurrenceCount |
$rrules, $recurrenceEvents |
protected |
Ensures the recurrence count is enforced against generated recurrence events |
unfold |
$lines |
protected |
Unfolds an iCal file in preparation for parsing |
calendarDescription |
- |
public |
Returns the calendar description |
calendarName |
- |
public |
Returns the calendar name |
calendarTimeZone |
$ignoreUtc |
public |
Returns the calendar time zone |
events |
- |
public |
Returns an array of Events |
eventsFromInterval |
$interval |
public |
Returns a sorted array of events following a given string, or false if no events exist in the range |
eventsFromRange |
$rangeStart = false, $rangeEnd = false |
public |
Returns a sorted array of events in a given range, or an empty array if no events exist in the range |
freeBusyEvents |
- |
public |
Returns an array of arrays with all free/busy events |
hasEvents |
- |
public |
Returns a boolean value whether the current calendar has events or not |
iCalDateToDateTime |
$icalDate, $forceTimeZone = false, $forceUtc = false |
public |
Returns a DateTime object from an iCal date time format |
iCalDateToUnixTimestamp |
$icalDate, $forceTimeZone = false, $forceUtc = false |
public |
Returns a Unix timestamp from an iCal date time format |
iCalDateWithTimeZone |
$event, $key, $format = DATE_TIME_FORMAT |
public |
Returns a date adapted to the calendar time zone depending on the event TZID |
isValidDate |
$value |
public |
Checks if a date string is a valid date |
parseExdates |
$event |
public |
Parses a list of excluded dates to be applied to an Event |
sortEventsWithOrder |
$events, $sortOrder = SORT_ASC |
public |
Sorts events based on a given sort order |