intelogie/vcalendar
Composer 安装命令:
composer require intelogie/vcalendar
包简介
PHP Class to generate VCalendar (ics) file
README 文档
README
PHP Class to generate VCalendar (ics) file. Compatible with GMail Calendar attachement.
Installation
This page contains information about installing the Library for PHP.
Requirements
- PHP version 5.3.0 or greater (including PHP 7)
Obtaining the client library
There are two options for obtaining the files for the client library.
Using Composer
You can install the library by adding it as a dependency to your composer.json.
"require": {
"davaxi/vcalendar": "^1.0"
}
Cloning from GitHub
The library is available on GitHub. You can clone it into a local repository with the git clone command.
git clone https://github.com/davaxi/VCalendar.git
What to do with the files
After obtaining the files, ensure they are available to your code. If you're using Composer, this is handled for you automatically. If not, you will need to add the autoload.php file inside the client library.
require '/path/to/vcalendar/folder/autoload.php';
Usage
<?php require '/path/to/vcalendar/folder/autoload.php'; $VCalendar = new Davaxi\VCalendar(); $VCalendar->setProcess('Davaxi', 'Davaxi Events', 'v1.0', 'EN'); $VCalendar->setMethod('PUBLISH'); $VCalendar->setCalendarName('Events - Davaxi'); $VCalendar->setTimeZone('Europe/Paris'); $VCalendar->setStartDateTime('2016-06-10 10:00:00'); $VCalendar->setEndDateTime('2016-06-10 14:00:00'); $VCalendar->setStatus('CONFIRMED'); $VCalendar->setTitle('My Event Title'); $VCalendar->setDescription('My Event Description'); $VCalendar->setOrganizer('Davaxi', 'root@domain.fr'); $VCalendar->setClass('PUBLIC'); $VCalendar->setCreatedDateTime('2016-06-01 00:00:00'); $VCalendar->setLocation('Paris', 48.874086, 2.345640); $VCalendar->setUrl('https://www.domain.com/'); $VCalendar->setSequence(4); $VCalendar->setLastUpdatedDateTime('2016-06-01 01:00:00'); $VCalendar->setCategories(array('ENTERTAINMENT')); $VCalendar->setUID('event_davaxi_1'); $VCalendar->addAttendee('Guest', 'REQ-PARTICIPANT', 'guest@domain.com',false); $VCalendar->stream(); exit();
Documentation
<?php // Filename for download stream $event = new Davaxi\VCalendar($fileName = 'invite'); // Set process info $VCalendar->setProcess($processOwner, $processName, $processVersion, $processLang) // Set method (REQUEST / PUBLISH) $VCalendar->setMethod($method); // Set event calendar name $VCalendar->setCalendarName($calendarName); // Set event timezone $VCalendar->setTimeZone($timeZone); // Set event start datetime $VCalendar->setStartDateTime($startDateTime); // Set event end datetime $VCalendar->setEndDateTime($endDateTime); // Set event status (TENTATIVE / CONFIRMED / CANCELED) $VCalendar->setStatus($status); // Set event title $VCalendar->setTitle($title); // Set event description $VCalendar->setDescription($description); // Set organize info $VCalendar->setOrganizer($organizerName, $organizerEmail); // Set event class (PUBLIC / PRIVATE / CONFIDENTIAL) $VCalendar->setClass($class); // Set event created datetime $VCalendar->setCreatedDateTime($createdDateTime); // Set event location $VCalendar->setLocation($locationString, $locationLat, $locationLng); // Set event URL $VCalendar->setUrl($url); // Set sequence $VCalendar->setSequence($sequence); // Set event last updated datetime $VCalendar->setLastUpdatedDateTime($lastUpdatedDateTime); // Set event categories $VCalendar->setCategories($categories); // Set event UID (for updates) $VCalendar->setUID($UID); // Add attendee (types: CHAIR / REQ-PARTICIPANT / OPT-PARTICIPANT / NON-PARTICIPANT) $VCalendar->addAttendee($name, $type, $email, $rsvp); // Stream file with header $VCalendar->stream(); // or get content $content = $VCalendar->getContent();
Integrate with PHPMailer with GMail direct add to calendar action
$PHPMailer = new PHPMailer(); $VCalendar = new Davaxi\VCalendar(); // [...] Set VCalendar // [...] Configure PHPMailer $PHPMailer->addStringAttachment( $VCalendar->getContent(), $VCalendar->getFilename(), 'base64', $VCalendar->getContentType(), 'attachment' ); $PHPMailer->Send();
intelogie/vcalendar 适用场景与选型建议
intelogie/vcalendar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 109 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 11 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「file」 「event」 「calendar」 「ics」 「outlook」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 intelogie/vcalendar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 intelogie/vcalendar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 intelogie/vcalendar 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
Symfony bundle for broadway/broadway.
Laravel Media Popup to upload/view the files
PMVC Plugin for File information
Mapper for accessing resources in KWCMS
Text file manipulation
统计信息
- 总下载量: 109
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-24