x-one/smsplanet-notifier-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require x-one/smsplanet-notifier-bundle
包简介
Integrates SMSPLANET provider with Symfony Notifier
README 文档
README
Provides SMSPLANET integration for Symfony Notifier.
composer require x-one/smsplanet-notifier-bundle
DSN example
SMSPLANET_DSN=smsplanet://KEY:PASSWORD@default?from=FROM&test=TEST
where:
KEYis your API key (token)PASSWORDis your API passwordTESTsetting this parameter to "1" (default "0") will result in sending message in test mode (message is validated, but not sent)
See your account info at https://panel.smsplanet.pl/.
Adding options to a message
You can use the SmsplanetOptions class to add message options:
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\TexterInterface;
use XOne\Bundle\NotifierBundle\SmsplanetOptions;
$sms = new SmsMessage('+4811111111', 'My message');
$options = (new SmsplanetOptions())
->date((new DateTime())->modify('+1 hour'))
->name('Start systemu')
->clearPolish(true)
->param1(['Jan', 'Zbigniew', 'Jerzy'])
->param2(['Kowalski', 'Nowak', 'Wiśniewski'])
->param3(['54-152', '43-190', '60-118'])
->param4(['Wrocław', 'Mikołów', 'Poznań'])
->companyId('A005')
->transactional(true)
;
// Add the custom options to the sms message and send the message
$sms->options($options);
/**
* @var TexterInterface $texter
*/
$texter->send($sms);
Resources
统计信息
- 总下载量: 208
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-11-08