承接 renfordt/icstorm 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

renfordt/icstorm

最新稳定版本:1.0.1

Composer 安装命令:

composer require renfordt/icstorm

包简介

A PHP package for generating ICS files.

README 文档

README

A package for creating and importing iCalendar/ICS files with one or multiple events.

Badge Packagist Version Packagist PHP Version GitHub License GitHub Actions Workflow Status Code Climate coverage Code Climate maintainability

Installation

The recommended way to install this package is using Composer. Execute the following command. This will not only install the package but also add it to your project's composer.json file as a dependency.

composer require renfordt/icstorm

Usage

Create Events

The PHP code below is used to create a new event.

The variables at the beginning (title, summary, description, startDate, endDate, classification, transparency, and location) represent different details of the event:

  • title: The title of the event.
  • summary: A brief overview of the event.
  • description: Detailed information about the event.
  • startDate and endDate: The start and end dates of the event and are mandatory.
  • classification: The visibility of the event, indicating whether it's private or public.
  • transparency: Indicates whether the time of the event is blocked or free.
  • location: Location of the event.

These details are collected together into an associative array using the compact function. This array is then passed as an argument to the Event::createEvent function, which generates an instance of an event with these details.

$title = 'Test Event';
$summary = 'Test Event';
$description = 'This is a test event';
$startDate = '2024-10-15 18:15:00';
$endDate = '2024-10-15 18:45:00';
$classification = EventClassification::private;
$transparency = EventTransparency::opaque;
$location = 'Test Location';

$event = Event::create(
    compact('title',
        'summary',
        'description',
        'startDate',
        'endDate',
        'classification',
        'transparency',
        'location'));

Create an iCalendar

To create an iCalendar/ICS file you can use the following code.

First create a new Calendar instance and add all required Events to it. After that you can generate the ICS string or the file with the functions.

$calendar = new Calendar();
$calendar->addEvent($event);

$ics = $calendar->generateICS(); // generates a ICS string
$icsFile = $calendar->generateICSFile(); // generates a ICS file

统计信息

  • 总下载量: 2.08k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固