cti/ics

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

ics management

0.4 2015-04-20 09:45 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:04:00 UTC


README

Build Status Code Climate

Aim of current library is to allow easy manipulation of .ics files.

Install

Using Composer

Add

  "cti/ics": "0.1"

to the "require" section of your composer.json file.

Usage

Named calendar, with timezone, and two events

// initialise calendar
$calendar = new Calendar('Automated Test', 'Europe/London');

// add events to it
$calendar->add(new Event\Interval('2015-03-13 10:05:00', '2015-03-13 10:19:59', 'Daily scrum'));
$calendar->add(new Event\Interval('2015-03-13 10:30:00', '2015-03-13 10:49:59', 'Weekly project review'));

Saving to file

$path = '/tmp/generated.ics';
$generator = new Generator(new FileOutput($path));
$generator->calendar($calendar)->getOutput()->getAll();

Output to string

// grab the output in a string for later usage
$generator = new Generator(new StringOutput());
$output = $generator->calendar($calendar)->getOutput()->getAll();