定制 bvanhoekelen/icalendar-php 二次开发

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

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

bvanhoekelen/icalendar-php

最新稳定版本:0.2.1

Composer 安装命令:

composer require bvanhoekelen/icalendar-php

包简介

Create easily a full iCalendar subscription service. Compatible with the best Calendar Apps, Laravel and Composer.

README 文档

README

Hex.pm GitHub release Packagist Github issues

composer require bvanhoekelen/icalendar-php

Highlight

  • Generate simpel ical sub

Example

<?php

require_once('../vendor/autoload.php');

use Calendar\Element\Calendar;
use Calendar\Type\Location;
use Calendar\Type\Geo;

$calender = (new Calendar())
	->setColor('#00A677')
	->setName('Custom name')
	->setDescription('Custom description')
	->setRefreshInterval('P1H')
;

// Add Event
$calender->newEvent()
	->setDtStart(new DateTime('now'))
	->setDtEnd(new DateTime('+1 day'))
	->setDtStamp(new DateTime('now'))
	->setSummary('short summary of the event')
	->setDescription('full description of the event')
	->setUrl('https://www.google.nl')
	// Add Location
	->setLocationWizard(((new Location())
		->setTitle('Koninklijk Paleis Amsterdam')
		->setStreetAddress('Nieuwezijds Voorburgwal 147')
		->setZipCode('1012 RJ')
		->setCity('Amsterdam')
		->setCountry('Nederland')
		->setGeo(new Geo(52.373149,4.891342))
	))
	// Add organizer
	->setOrganizerWizard('Bart', 'exemple@gmail.com')
	// Add attended
	->setAttendee((new Attendee())
		->wizard(Attendee::PARTSTAT_ACCEPTED, 'Bart', 'exemple@gmail.com')
	)
	->setAttendee((new Attendee())
		->wizard(Attendee::PARTSTAT_ACCEPTED, 'Henk', 'exemple2@gmail.com')
	)
	// Add repeat
	->setRepeatRule((new RepeatRule(RepeatRule::FREQ_YEARLY))
		->setByDay(RepeatRule::BYDAY_TH)
		->setBySetPos(RepeatRule::BYSETPOS_FIRST)
		->setByMonth(RepeatRule::BYMONTH_NOV)
		->setCount(7)
	)
;

// Render to string with headers
echo $calender->serve();

See more examples.

Help, docs and links

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-01-24