PHP Classes

Creating multiple events, not multiple calendars.

Recommend this page to a friend!

      ical  >  All threads  >  Creating multiple events, not...  >  (Un) Subscribe thread alerts  
Subject:Creating multiple events, not...
Summary:Add support for multiple events in a calendar.
Author:Michael Pawlowsky
Date:2014-02-22 18:54:10

  1. Creating multiple events, not...   Reply   Report abuse  
Picture of Michael Pawlowsky Michael Pawlowsky - 2014-02-22 18:54:10

It's a nice class, but it would be much more useful as something like:

$ical = new iCal('myCalendar');

$ical->addEvent(array('startDate'=>'12/03/2014', 'endDate'=>'12/03/2014', 'title'=>'Some event'));
$ical->addEvent(array('startDate'=>'12/10/2014', 'endDate'=>'12/03/2014', 'title'=>'Another event'));
$ical->addEvent(array('startDate'=>'12/25/2014', 'endDate'=>'12/03/2014', 'title'=>'Christmas'));

header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename=' . $ical->name);

// Dump load
echo $ical->createCalendar();

In other words, be able to have MANY events or just one event in a calendar.