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.