There is no license information available for the latest version (1.0.0) of this package.

This package offers PHP-classes to create iCal compatible *.ics files.

1.0.0 2012-10-24 15:04 UTC

This package is not auto-updated.

Last update: 2024-12-21 14:42:55 UTC


README

This package offers PHP-classes to create iCal compatible *.ics files.

Usage

1. Create a Calendar object

$vCalendar = new \Eluceo\iCal\Component\Calendar('www.example.com');

2. Create an Event object

$vEvent = new \Eluceo\iCal\Component\Event();

3. Add your information to the Event

$vEvent->setDtStart(new \DateTime('2012-12-24'));
$vEvent->setDtEnd(new \DateTime('2012-12-24'));
$vEvent->setNoTime(true);
$vEvent->setSummary('Christmas');

4. Add Event to Calendar

$vCalendar->addEvent($vEvent);

5. Set HTTP-headers

header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="cal.ics"');

6. Send output

echo $vCalendar->render();