symfony / bandwidth-notifier
Symfony Bandwidth Notifier 桥接器
v7.1.5
2024-09-19 19:17 UTC
Requires
- php: >=8.2
- symfony/http-client: ^6.4|^7.0
- symfony/notifier: ^6.4|^7.0
Requires (Dev)
- symfony/event-dispatcher: ^6.4|^7.0
This package is auto-updated.
Last update: 2024-09-21 06:13:05 UTC
README
为 Symfony Notifier 提供 Bandwidth 集成。
DSN 示例
BANDWIDTH_DSN=bandwidth://USERNAME:PASSWORD@default?from=FROM&account_id=ACCOUNT_ID&application_id=APPLICATION_ID&priority=PRIORITY
其中
USERNAME
是您的 Bandwidth 用户名PASSWORD
是您的 Bandwidth 密码FROM
是您的发送者ACCOUNT_ID
是您的账户 IDAPPLICATION_ID
是您的应用 IDPRIORITY
是您的优先级(可选)
向消息添加选项
使用 Bandwidth 消息,您可以使用 BandwidthOptions
类来添加 消息选项。
use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthOptions; $sms = new SmsMessage('+1411111111', 'My message'); $options = (new BandwidthOptions()) ->media(['foo']) ->tag('tag') ->accountId('account_id') ->applicationId('application_id') ->expiration('test_expiration') ->priority('default') // ... ; // Add the custom options to the sms message and send the message $sms->options($options); $texter->send($sms);
资源
- 贡献
- 在 主 Symfony 仓库 中 提交问题 和 发送拉取请求