Overview

Namespaces

  • intouch
    • ical

Classes

  • Duration
  • Factory
  • Freq
  • iCal
  • Line
  • Parser
  • Query
  • Recurrence
  • VCalendar
  • VEvent
  • VTimeZone
  • Overview
  • Namespace
  • Class
  • Tree

Class iCal

A simple iCal parser.

http://github.com/mfkahn/intouch-iCalendar based on http://github.com/fangel/SG-iCalendar

Roadmap:

  • Finish FREQUENCY-parsing.
  • Add API for recurring events

A simple example:

<?php
use intouch\ical\iCal;
$ical = new iCal("http://example.com/calendar.ics");
foreach( $ical->getEvents() As $event ) {
  // Do stuff with the event $event
}
?>
Namespace: intouch\ical
License: CC-BY-SA-DK
Author: Morten Fangel (C) 2008
Author: xonev (C) 2010
Author: Tanguy Pruvot (C) 2010
Author: Michael Kahn (C) 2013
Located at ical/iCal.php
Methods summary
public
# __construct( mixed $url = false )

Constructs a new iCalReader. You can supply the url now, or later using setUrl

Constructs a new iCalReader. You can supply the url now, or later using setUrl

Parameters

$url
mixed
$url string
public
# setUrl( mixed $url = false )

Sets (or resets) the url this reader reads from.

Sets (or resets) the url this reader reads from.

Parameters

$url
mixed
$url string
public intouch\ical\VCalendar
# getCalendarInfo( )

Returns the main calendar info. You can then query the returned object with ie getTitle().

Returns the main calendar info. You can then query the returned object with ie getTitle().

Returns

intouch\ical\VCalendar
public
# setCalendarInfo( intouch\ical\VCalendar $info )

Sets the calendar info for this calendar

Sets the calendar info for this calendar

Parameters

$info
intouch\ical\VCalendar
$info
public intouch\ical\VTimeZone
# getTimeZoneInfo( mixed $tzid = null )

Returns a given timezone for the calendar. This is mainly used by VEvents to adjust their date-times if they have specified a timezone.

Returns a given timezone for the calendar. This is mainly used by VEvents to adjust their date-times if they have specified a timezone.

If no timezone is given, all timezones in the calendar is returned.

Parameters

$tzid
mixed
$tzid string

Returns

intouch\ical\VTimeZone
public
# addTimeZone( intouch\ical\VTimeZone $tz )

Adds a new timezone to this calendar

Adds a new timezone to this calendar

Parameters

$tz
intouch\ical\VTimeZone
$tz
public array
# getEvents( )

Returns the events found

Returns the events found

Returns

array
public
# addEvent( intouch\ical\VEvent $event )

Adds a event to this calendar

Adds a event to this calendar

Parameters

$event
intouch\ical\VEvent
$event
Properties summary
public mixed $information
#
public mixed $timezones
#
protected mixed $events
#
intouch-iCalendar API documentation generated by ApiGen 2.8.0