symfony / contact-everyone-notifier
Symfony Contact Everyone Notifier 桥接器
v7.1.1
2024-05-31 14:57 UTC
Requires
- php: >=8.2
- symfony/http-client: ^6.4|^7.0
- symfony/notifier: ^6.4|^7.0
- 7.2.x-dev
- 7.1.x-dev
- v7.1.1
- v7.1.0
- v7.1.0-RC1
- v7.1.0-BETA1
- 7.0.x-dev
- v7.0.8
- v7.0.7
- v7.0.3
- v7.0.0
- v7.0.0-RC1
- v7.0.0-BETA1
- 6.4.x-dev
- v6.4.8
- v6.4.7
- v6.4.3
- v6.4.0
- v6.4.0-RC1
- v6.4.0-BETA1
- 6.3.x-dev
- v6.3.12
- v6.3.0
- v6.3.0-RC1
- v6.3.0-BETA3
- v6.3.0-BETA1
- 6.2.x-dev
- v6.2.7
- v6.2.5
- v6.2.0
- v6.2.0-RC1
- v6.2.0-BETA3
- v6.2.0-BETA1
This package is auto-updated.
Last update: 2024-08-25 06:40:55 UTC
README
为 Symfony Notifier 提供联系所有人集成。
DSN 示例
CONTACT_EVERYONE_DSN=contact-everyone://TOKEN@default?&diffusionname=DIFFUSION_NAME&category=CATEGORY
其中
TOKEN
是您的 Contact Everyone API 令牌DIFFUSION_NAME
(可选)允许您定义将在事件日志中显示的扩散标签。CATEGORY
(可选)允许您定义将在事件日志中显示的类别标签。
此桥接器使用 Contact Everyone API 的轻量版。
请在https://contact-everyone.orange-business.com/#/login查看您的账户信息
向消息添加选项
使用 Contact everyone 消息,您可以使用 ContactEveryoneOptions
类来添加消息选项。
use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Bridge\ContactEveryone\ContactEveryoneOptions; $sms = new SmsMessage('+1411111111', 'My message'); $options = (new ContactEveryoneOptions()) ->diffusionName('My label') ->category('my-category') // ... ; // Add the custom options to the sms message and send the message $sms->options($options); $texter->send($sms);