dolibarr 20.0.2
|
Class to read/parse ICal calendars. More...
Public Member Functions | |
__construct () | |
Constructor. | |
read_file ($file) | |
Read text file, icalender text file. | |
get_event_count () | |
Returns the number of calendar events. | |
get_todo_count () | |
Returns the number of to do. | |
parse ($uri, $usecachefile='', $delaycache=3600) | |
Translate Calendar. | |
add_to_array ($type, $key, $value) | |
Add to $this->ical array one value and key. | |
retun_key_value ($text) | |
Parse text "XXXX:value text some with : " and return array($key = "XXXX", $value="value");. | |
ical_rrule ($value) | |
Parse RRULE return array. | |
ical_date_to_unix ($ical_date) | |
Return Unix time from ical date time format (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS) | |
ical_dt_date ($key, $value) | |
Return unix date from iCal date format. | |
get_sort_event_list () | |
Return sorted eventlist as array or false if calendar is empty. | |
ical_dtstart_compare ($a, $b) | |
Compare two unix timestamp. | |
get_event_list () | |
Return eventlist array (not sorted eventlist array) | |
get_freebusy_list () | |
Return freebusy array (not sort eventlist array) | |
get_todo_list () | |
Return to do array (not sorted todo array) | |
get_calender_data () | |
Return base calendar data. | |
get_all_data () | |
Return array with all data. | |
Class to read/parse ICal calendars.
Definition at line 35 of file ical.class.php.
ICal::add_to_array | ( | $type, | |
$key, | |||
$value ) |
Add to $this->ical array one value and key.
string | $type | Type ('VTODO', 'VEVENT', 'VFREEBUSY', 'VCALENDAR'...) |
string | $key | Key ('DTSTART', ...). Note: Field is never 'DTSTART;TZID=...' because ';...' was before removed and added as another property |
string | $value | Value |
Definition at line 270 of file ical.class.php.
References ical_date_to_unix(), and ical_dt_date().
Referenced by parse().
ICal::get_all_data | ( | ) |
ICal::get_calender_data | ( | ) |
ICal::get_event_count | ( | ) |
ICal::get_event_list | ( | ) |
Return eventlist array (not sorted eventlist array)
Definition at line 462 of file ical.class.php.
Referenced by get_sort_event_list().
ICal::get_freebusy_list | ( | ) |
Return freebusy array (not sort eventlist array)
Definition at line 474 of file ical.class.php.
ICal::get_sort_event_list | ( | ) |
Return sorted eventlist as array or false if calendar is empty.
Definition at line 430 of file ical.class.php.
References get_event_list().
ICal::get_todo_count | ( | ) |
ICal::get_todo_list | ( | ) |
Return to do array (not sorted todo array)
Definition at line 486 of file ical.class.php.
ICal::ical_date_to_unix | ( | $ical_date | ) |
Return Unix time from ical date time format (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS)
string | $ical_date | String date |
Definition at line 375 of file ical.class.php.
References dol_mktime().
Referenced by add_to_array(), and ical_dt_date().
ICal::ical_dt_date | ( | $key, | |
$value ) |
Return unix date from iCal date format.
string | $key | Key. Example: 'DTSTART', 'DTSTART;TZID=US-Eastern' |
string | $value | Value. Example: '19970714T133000', '19970714T173000Z', '19970714T133000' |
Definition at line 401 of file ical.class.php.
References ical_date_to_unix().
Referenced by add_to_array().
ICal::ical_dtstart_compare | ( | $a, | |
$b ) |
Compare two unix timestamp.
array | $a | Operand a |
array | $b | Operand b |
Definition at line 450 of file ical.class.php.
ICal::ical_rrule | ( | $value | ) |
Parse RRULE return array.
string | $value | string |
Definition at line 356 of file ical.class.php.
ICal::parse | ( | $uri, | |
$usecachefile = '', | |||
$delaycache = 3600 ) |
string | $uri | Url |
string | $usecachefile | Full path of a cache file to use a cache file |
int | $delaycache | Delay in seconds for cache (by default 3600 secondes) |
Definition at line 143 of file ical.class.php.
References add_to_array(), dol_filemtime(), dol_now(), dolChmod(), quotedPrintDecode(), read_file(), and retun_key_value().
ICal::read_file | ( | $file | ) |
Read text file, icalender text file.
string | $file | File |
Definition at line 92 of file ical.class.php.
References getURLContent().
Referenced by parse().
ICal::retun_key_value | ( | $text | ) |
Parse text "XXXX:value text some with : " and return array($key = "XXXX", $value="value");.
string | $text | Text |
Definition at line 331 of file ical.class.php.
Referenced by parse().