bpa / notifications
向不同处理器发送通知的系统
v1.1
2018-11-02 13:46 UTC
Suggests
- bpa/notifications-slack: Allows you to send notifications to your slack instance
- bpa/notifications-stride: Allows you to send notifications to your stride cloud instance
This package is auto-updated.
Last update: 2024-08-29 04:25:46 UTC
README
一次性向配置的不同处理器发送通知。
安装
$ composer require bpa/notifications
用法
创建一个房间,将消息发送到该房间
class DeveloperRoom implements RoomInterface { public function getIdentifier() { return 'developer-room'; } public function getName() { return 'Room for developers'; } }
创建消息类型
class UrgentDeveloperMessage implements MessageInterface { public function getTitle() { return null; } public function getMessage() { return 'There is an urgent task waiting to be done'; } public function getRoom() { return new DeveloperRoom(); } }
处理器
目前只有一个处理器。但将会有更多。我非常希望看到对其他聊天工具(如Slack、Hipchat、IRC等)的一些贡献。
- Stride: bpa/notifications-stride
- Slack: bpa/notifications-slack