Wallogit.com
2017 © Pedro Peláez
An ical file maker
It's a simple little thing, but it keeps comming back so I made a package for it. This package contains a single class which generates an iCal (.ics) file for your agenda to import., (*1)
availiblilty
use Thorazine\Ics\Ics;
$ical = new Ics([
'title' => 'Test Ics',
'startDate' => '2017-07-21 12:00:00',
'endDate' => '2017-07-21 14:00:00',
]);
$ical->stream();
use Thorazine\Ics\Ics;
$ical = new Ics([
'title' => 'Test Ics',
'startDate' => '2017-07-21 12:00:00',
'endDate' => '2017-07-21 14:00:00',
]);
file_put_contents('some-filename.ics', $ical->get());
Options are inserted in the array when creating a new Ics class, (*2)
| key | Mandatory | Type | Possible values |
|---|---|---|---|
| title | true | string | Any |
| startDate | true | timestamp | Any timestamp as excepted by strtotime() |
| endDate | true | timestamp | Any timestamp as excepted by strtotime() |
| summary | false | string | Any |
| description | false | string | /n for new line |
| location | false | string | Any |
| timezone | false | timezone | Any timezone known to PHP |
| alarm | false | string | [integer][D or H or M] (M = minute, H = hour, D = Day) |
| availibility | false | boolean | true = opaque and out of office, false = transparant and free |