cti / ics
该软件包最新版本(0.4)没有提供许可证信息。
ics管理
0.4
2015-04-20 09:45 UTC
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: 2024-09-14 18:09:31 UTC
README
当前库的目的是允许轻松操作.ics
文件。
安装
使用Composer
将以下内容
"cti/ics": "0.1"
添加到你的composer.json
文件的"require"
部分。
用法
命名日历,包含时区和两个事件
// 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'));
保存到文件
$path = '/tmp/generated.ics'; $generator = new Generator(new FileOutput($path)); $generator->calendar($calendar)->getOutput()->getAll();
输出到字符串
// grab the output in a string for later usage $generator = new Generator(new StringOutput()); $output = $generator->calendar($calendar)->getOutput()->getAll();