dolibarr  7.0.0-beta
Public Member Functions | List of all members
ICal Class Reference

Class to read/parse ICal calendars. More...

Public Member Functions

 __construct ()
 Constructor.
 
 read_file ($file)
 Read text file, icalender text file. More...
 
 get_event_count ()
 Returns the number of calendar events. More...
 
 get_todo_count ()
 Returns the number of to do. More...
 
 parse ($uri)
 Translate Calendar. More...
 
 add_to_array ($type, $key, $value)
 Add to $this->ical array one value and key. More...
 
 retun_key_value ($text)
 Parse text "XXXX:value text some with : " and return array($key = "XXXX", $value="value");. More...
 
 ical_rrule ($value)
 Parse RRULE return array. More...
 
 ical_date_to_unix ($ical_date)
 Return Unix time from ical date time fomrat (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS) More...
 
 ical_dt_date ($key, $value)
 Return unix date from iCal date format. More...
 
 get_sort_event_list ()
 Return sorted eventlist as array or false if calenar is empty. More...
 
 ical_dtstart_compare ($a, $b)
 Compare two unix timestamp. More...
 
 get_event_list ()
 Return eventlist array (not sort eventlist array) More...
 
 get_freebusy_list ()
 Return eventlist array (not sort eventlist array) More...
 
 get_todo_list ()
 Return to do array (not sort to do array) More...
 
 get_calender_data ()
 Return base calendar data. More...
 
 get_all_data ()
 Return array with all data. More...
 

Detailed Description

Class to read/parse ICal calendars.

Definition at line 32 of file ical.class.php.

Member Function Documentation

ICal::add_to_array (   $type,
  $key,
  $value 
)

Add to $this->ical array one value and key.

Parameters
string$typeType ('VTODO', 'VEVENT', 'VFREEBUSY', 'VCALENDAR'...)
string$keyKey ('DTSTART', ...). Note: Field is never 'DTSTART;TZID=...' because ';...' was before removed and added as another property
string$valueValue
Returns
void

Definition at line 206 of file ical.class.php.

References ical_date_to_unix(), and ical_dt_date().

Referenced by parse().

ICal::get_all_data ( )

Return array with all data.

Returns
array

Definition at line 424 of file ical.class.php.

ICal::get_calender_data ( )

Return base calendar data.

Returns
array

Definition at line 414 of file ical.class.php.

ICal::get_event_count ( )

Returns the number of calendar events.

Returns
int

Definition at line 75 of file ical.class.php.

ICal::get_event_list ( )

Return eventlist array (not sort eventlist array)

Returns
array

Definition at line 384 of file ical.class.php.

Referenced by get_sort_event_list().

ICal::get_freebusy_list ( )

Return eventlist array (not sort eventlist array)

Returns
array

Definition at line 394 of file ical.class.php.

ICal::get_sort_event_list ( )

Return sorted eventlist as array or false if calenar is empty.

Returns
array

Definition at line 353 of file ical.class.php.

References get_event_list().

ICal::get_todo_count ( )

Returns the number of to do.

Returns
int

Definition at line 85 of file ical.class.php.

ICal::get_todo_list ( )

Return to do array (not sort to do array)

Returns
array

Definition at line 404 of file ical.class.php.

ICal::ical_date_to_unix (   $ical_date)

Return Unix time from ical date time fomrat (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS)

Parameters
string$ical_dateString date
Returns
int

Definition at line 304 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.

Parameters
string$keyKey
string$valueValue
Returns
array

Definition at line 326 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.

Parameters
array$aOperand a
array$bOperand b
Returns
integer

Definition at line 374 of file ical.class.php.

ICal::ical_rrule (   $value)

Parse RRULE return array.

Parameters
string$valuestring
Returns
array

Definition at line 287 of file ical.class.php.

ICal::parse (   $uri)

Translate Calendar.

Parameters
string$uriUrl
Returns
array

Definition at line 96 of file ical.class.php.

References add_to_array(), quotedPrintDecode(), read_file(), and retun_key_value().

ICal::read_file (   $file)

Read text file, icalender text file.

Parameters
string$fileFile
Returns
string

Definition at line 56 of file ical.class.php.

Referenced by parse().

ICal::retun_key_value (   $text)

Parse text "XXXX:value text some with : " and return array($key = "XXXX", $value="value");.

Parameters
string$textText
Returns
array

Definition at line 264 of file ical.class.php.

Referenced by parse().


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