itzamna/ics

Calender file wrapper

5.1.1 2021-02-01 22:42 UTC

This package is auto-updated.

Last update: 2024-04-29 03:56:53 UTC


README

Itzamna ICS is a tool intended to be able to easily generate an ICS file.

Concepts

Events

Itzamna includes an event object, but you can use any event that implements the included EventInterface to set and get related fields.

Fields

TODO: Definitions

Field Description
Organizer TODO
Uid TODO
Timezone* Event time zone
Start Date* Event start date
End Date* Event end date
Summary Short summary
Location Location string
Description Full event description
Categories TODO

*: Note that all date/time fields use Carbon and will accept any valid value that carbon will for those fields.

Ics Object

The ICS object allows you to set a prodid and add any number of Events.

Usage

$ics = new Itzamna\Ics();
$event = new Itzamna\Event();

$ics->setICSProdid('prodid');

$event->setICSOrganizer('organizer@mail.com');
$event->setICSUid('19');
$event->setICSTimezone(-7);
$event->setICSStartDate('-5 days');
$event->setICSEndDate('+1 days');
$event->setICSSummary('Test');
$event->setICSLocation('Here');
$event->setICSDescription('A test event');
$event->setICSCategories('Tests');

$ics->addEvent($event);

echo $ics;

External Resources