relaxsd/php-icalendar
Composer 安装命令:
composer require relaxsd/php-icalendar
包简介
Fluent iCalendar creator for PHP
README 文档
README
Fluent iCalendar creator for PHP
For the RFC, See https://www.ietf.org/rfc/rfc2445.txt
Current status:
- RFC Coverage: 80% (supports all components except
VTIMEZONE) - Fluent interface: 70% (working on it)
- Test cases: 10% (tested just some examples from the RFC, see below.)
Examples from the RFC:
Event
The following is an example of the "VEVENT" calendar component used to represent a meeting that will also be opaque to searches for busy time:
BEGIN:VEVENT
UID:19970901T130000Z-123401@host.com
DTSTAMP:19970901T1300Z
DTSTART:19970903T163000Z
DTEND:19970903T190000Z
SUMMARY:Annual Employee Review
CLASS:PRIVATE
CATEGORIES:BUSINESS,HUMAN RESOURCES
END:VEVENT
To create this event in PHP:
$event = new Event('19970901T130000Z-123401@host.com') ->setDateTimeStamp('1997-09-01 13:00 UTC') ->setDateTimeStart('1997-09-03 16:30 UTC') ->setDateTimeEnd('1997-09-03 19:00 UTC') ->setSummary('Annual Employee Review') ->setClassification(Classification::CLASSIFICATION_PRIVATE) ->setCategories(['BUSINESS', 'HUMAN RESOURCES']);
Audio Alarm
The following example is for a "VALARM" calendar component that specifies an audio alarm that will sound at a precise time and repeat 4 more times at 15 minute intervals:
BEGIN:VALARM
TRIGGER;VALUE=DATE-TIME:19970317T133000Z
REPEAT:4
DURATION:PT15M
ACTION:AUDIO
ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud
END:VALARM
To create this event in PHP:
$audioAlarm = new AudioAlarm() ->setTrigger('1997-03-17 13:30 UTC') ->setRepeatCount(4) ->setAttachment(UriAttachment::forAudioUrl('ftp://host.com/pub/sounds/bell-01.aud')) ->setDuration(Duration::forMinutes(15));
Audio Alarm
The following example is for a "VALARM" calendar component that specifies an audio alarm that will sound at a precise time and repeat 4 more times at 15 minute intervals:
BEGIN:VALARM
TRIGGER;VALUE=DATE-TIME:19970317T133000Z
REPEAT:4
DURATION:PT15M
ACTION:AUDIO
ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud
END:VALARM
To create this event in PHP:
$audioAlarm = new AudioAlarm() ->setTrigger('1997-03-17 13:30 UTC') ->setRepeatCount(4) ->setAttachment(UriAttachment::forAudioUrl('ftp://host.com/pub/sounds/bell-01.aud')) ->setDuration(Duration::forMinutes(15));
TODO Item
The following is an example of a "VTODO" calendar component:
BEGIN:VTODO
UID:19970901T130000Z-123404@host.com
DTSTAMP:19970901T1300Z
DTSTART:19970415T133000Z
DUE:19970416T045959Z
SUMMARY:1996 Income Tax Preparation
CLASS:CONFIDENTIAL
CATEGORIES:FAMILY,FINANCE
PRIORITY:1
STATUS:NEEDS-ACTION
END:VTODO
To create this event in PHP:
$todo = new Todo() ->setUniqueIdentifier('19970901T130000Z-123404@host.com') ->setDateTimeStamp('1997-09-01 13:00 UTC') ->setDateTimeStart('1997-04-15 13:30 UTC') ->setDateTimeDue('1997-04-16 04:59:59 UTC') ->setSummary('1996 Income Tax Preparation') ->setClassification(Classification::CLASSIFICATION_CONFIDENTIAL) ->setCategories(['FAMILY', 'FINANCE']) ->setPriority(1) ->setStatus(Status::STATUS_NEEDS_ACTION);
relaxsd/php-icalendar 适用场景与选型建议
relaxsd/php-icalendar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 58 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 11 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 relaxsd/php-icalendar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 relaxsd/php-icalendar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-21