定制 itsnubix/nowcal 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

itsnubix/nowcal

最新稳定版本:1.6.1

Composer 安装命令:

composer require itsnubix/nowcal

包简介

A modern PHP library for generating iCalendar v2.0 events

README 文档

README

Software License Total Downloads

A modern PHP library for generating iCalendar v2.0 events.

Getting Started

Installation

Install with composer using composer require itsnubix/nowcal

Basic usage

use NowCal\NowCal;

$event = NowCal::create(['start' => 'October 5, 2019 6:03PM']))
  ->summary('Daft Punk is playing')
  ->location('My House');

API

Properties

The following properties can be get/set on the NowCal instance. Users can take advantage of the set property helpers in the class, i.e.: $nowcal->location('Event Location'); as they provide a nice syntax to string multiple calls together and support callbacks if necessary.

Property Description
uid A globally unique ID. NOTE: passing the same ICS file into a calendar app with the same UI allows you to update the existing invite
start A string parseable by DateTime
timezone A string parseable by DateTimeZone
end A string parseable by DateTime, as per RFC 5545, only an end value or duration value may be used
duration A string parseable by DateInterval, as per RFC 5545, only an end value or duration value may be used
summary A short description of the event
location The location where the event is taking place
sequence An integer that represents the version number
method send if required, publish/cancel/etc
reminder A simple display reminder. A string parseable by DateInterval.

Methods

$props = [
  'start' => 'now',
  'end' => 'now + 1 hour',
  // OR
  'duration' => '28d 6h 42m 12s',
  'summary' => 'Daft Punk is playing',
  'location' => 'My House',
];

// Creates a NowCal instance
$nowcal = new NowCal($props); // or NowCal::create($props);

// Exports a raw output array
$nowcal->raw; // or NowCal::raw($props)

// Exports a plain text version
$nowcal->plain; // or NowCal::plain($props)

// Exports a path to a tempfile
$nowcal->file; // or NowCal::file($props)

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-08