flexic / scheduler-bundle
为 symfony 框架提供调度器组件。
2.0.4
2023-03-19 15:51 UTC
Requires
- php: ^8.1
- flexic/scheduler: ^2.0.4
- symfony/dependency-injection: ^6.1.5
- symfony/http-kernel: ^6.1.5
Requires (Dev)
- ergebnis/php-cs-fixer-config: ^4.9.0
- phpstan/phpstan: ^1.8.8
- phpstan/phpstan-deprecation-rules: ^1.0.0
- phpstan/phpstan-strict-rules: ^1.4.4
README
提供将 PHP 调度器库 集成到 Symfony 框架的功能。
安装
运行
composer require flexic/scheduler-bundle
以安装 flexic/scheduler-bundle
。
如果您使用 Symfony Flex,则组件将自动启用。要手动启用组件,请将其添加到项目中 config/bundles.php
文件中注册的组件列表。
return [ // ... Flexic\SchedulerBundle\SchedulerBundle::class => ['all' => true], // ... ];
标记调度事件
要将调度事件提供给调度器,您需要使用 scheduler.schedule_event
标记它。
services: _instanceof: Flexic\Scheduler\Interfaces\ScheduleEventInterface: tags: [ 'scheduler.schedule_event' ]
或者
services: Your\Schedule\Event\Class: tags: [ 'scheduler.schedule_event' ]
许可证
本软件包使用 GNU 许可证授权。
请参阅 LICENSE.md。