symfony / plivo-notifier
Symfony Plivo 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:08 UTC
README
为 Symfony Notifier 提供 Plivo 集成。
DSN 示例
PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM
其中
AUTH_ID
是您的 Plivo 认证 IDAUTH_TOKEN
是您的 Plivo 认证令牌FROM
是您的发送者
向消息添加选项
使用 Plivo 消息,您可以使用 PlivoOptions
类来添加 消息选项。
use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Bridge\Plivo\PlivoOptions; $sms = new SmsMessage('+1411111111', 'My message'); $options = (new PlivoOptions()) ->log(true) ->method('POST') ->url('url') ->mediaUrls('media_urls') ->powerpackUuid('uuid') ->trackable(true) ->type('sms') // ... ; // Add the custom options to the sms message and send the message $sms->options($options); $texter->send($sms);
资源
- 贡献
- 报告问题 和 发送拉取请求 在 主要 Symfony 仓库