cti / ics
ics management
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 24
Forks: 0
Open Issues: 0
pkg:composer/cti/ics
Requires
- php: >=5.3.0
- symfony/filesystem: ~2.6
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: 4.7.x-dev
This package is not auto-updated.
Last update: 2025-09-27 23:21:03 UTC
README
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();