maxwellmandela/php-recurrence
Composer 安装命令:
composer require maxwellmandela/php-recurrence
包简介
PHP library for working with recurrence rules, uses simshaun/recurr
README 文档
README
Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BYphp-recurrence - A PHP Recurring events library
PHP library for working with recurrence rules, uses simshaun/recurr
What it does
Very simply, php-recurrence enables scheduling recurring events much like simshaun/recurr but with more abtraction, e.g
twice every 3 weeksThis will generate an event recurring two times every 3 weeks It also needs to be mentioned that this is an approach to learning to TDD in PHP
How to
Install
Install using Composer:
composer require maxwellmandela/php-recurrence
No composer? You can clone/download the repository and use the package directly by including bootstrap.php onto your script
Seting up
Configure your script for php-recurrence
use Reccurence\Schedule; $timezone = 'Africa/Nairobi'; $schedule = new Schedule($timezone);
Creating a simple weekly frequency
You can create a simple array of dates by passing the start,end,freq,interval this way
$events = $schedule->createEvents([ 'start' => '2019-07-01 00:00:00', 'end' => '2019-07-31 00:00:00', 'interval' => 2, // for weekly events, you can change this to either MONTHLY|YEARLY|DAILY|HOURLY // read more here: https://tools.ietf.org/html/rfc5545 for all valid frequencies 'freq' => 'WEEKLY', ]);
Creating a weekly frequency with no. of times per interval
You can create an array of dates and number of recurrence per interval by passing the start,end,freq,interval,recurrence_count this way
$events = $schedule->createEvents([ 'start' => '2019-07-01 00:00:00', 'end' => '2019-07-31 00:00:00', 'interval' => 2, 'freq' => 'WEEKLY', // for an event recurring 3 times(recurrence_count) every(interval) 2 weeks(freq) 'recurrence_count' => 3, ]);
Credits
simshaun/recurr
nesbot/carbon
Contribution
All is welcome!
maxwellmandela/php-recurrence 适用场景与选型建议
maxwellmandela/php-recurrence 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「events」 「recurring」 「rrule」 「recurrence」 「dates」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 maxwellmandela/php-recurrence 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 maxwellmandela/php-recurrence 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 maxwellmandela/php-recurrence 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple Laravel 5 service provider for including the Recurly PHP client.
Rich payment solutions for zend framework2. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
Библиотека для реализаций паттерна Pub/Sub
Laravel Eloquent RRULE tools
Wireless Cross-Component Communication
MaxAl Subscriptions is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-07-07