jchr86 / calendr
面向对象的日历管理
2.1.4
2020-03-22 21:36 UTC
Requires
- php: ^5.5|^7.0
- symfony/options-resolver: ^2.7|^3.0|^4.0|^5.0
Requires (Dev)
- doctrine/cache: ^1.5
- doctrine/common: ^2.5
- doctrine/orm: ^2.5
- phpunit/phpunit: ^4.8.35|^5.4.0|^6.0|^7.0
- silex/silex: ^1.3
- symfony/config: ^2.7|^3.4|^4.0|^5.0
- symfony/dependency-injection: ^2.7|^3.4|^4.0|^5.0
- symfony/yaml: ^2.7|^3.4|^4.0|^5.0
- twig/twig: ^1.23|^2.0
This package is auto-updated.
Last update: 2024-09-29 04:43:35 UTC
README
CalendR 是一个基于 PHP5.3+ 日期对象的面向对象日历管理库。您可以使用它来处理所有关于日历和事件的需求。
完整文档
完整文档可在 此处 查找。
安装
CalendR 存放在 packagist 上,您可以使用 composer 进行安装。
打开命令行控制台,进入您的项目目录并执行
$ composer require jchr86/calendr
使用 Symfony Flex 的应用程序
启用 Bundle。
通过将其添加到项目 config/bundles.php
文件中注册的 Bundle 列表来启用 Bundle。
// config/bundles.php return [ // ... CalendR\Bridge\Symfony\Bundle\CalendRBundle::class => ['all' => true], ];
注册一个事件提供者。
// src/Repository/EventRepository.php namespace App\Repository; use App\Entity\Event; use CalendR\Bridge\Doctrine\ORM\EventRepository; use CalendR\Event\Provider\ProviderInterface; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\ORM\Query\Expr; class EventRepository extends ServiceEntityRepository implements ProviderInterface { use EventRepository; public function __construct(ManagerRegistry $registry) { parent::__construct($registry, Event::class); } }
// config/services.yaml services: App\Repository\EventRepository: tags: - { name: calendr.event_provider }
贡献
日历库欢迎贡献。合并延迟可能因我的空闲时间而异,但总是欢迎。
许可证
CalendR 采用 MIT 许可证授权 - 详细信息请参阅 LICENSE 文件。