kch/smsapi-bundle
最新稳定版本:1.6.2
Composer 安装命令:
composer require kch/smsapi-bundle
包简介
Symfony 2 Bundle for SMSApi PHP Client library.
README 文档
README
Symfony 2 Bundle for SMSApi PHP Client library.
Symfony 2 Bundle dla biblioteki SMSApi PHP Client.
Installation:
composer require kch/smsapi-bundle
Configuration - config.yml:
kch_sms_api:
clients:
default:
client_login: TEST
client_password_hash: TEST
Usage - sending one SMS:
Based on original library code: https://github.com/smsapi/smsapi-php-client/wiki/Examples
$smsFactory = $this->get('kch_sms_api.sms_factory.default');
try {
$actionSend = $smsFactory->actionSend();
$actionSend->setTo('600xxxxxx');
$actionSend->setText('Hello World!!');
$actionSend->setSender('Info'); //Pole nadawcy, lub typ wiadomości: 'ECO', '2Way'
$response = $actionSend->execute();
foreach ($response->getList() as $status) {
echo $status->getNumber() . ' ' . $status->getPoints() . ' ' . $status->getStatus();
}
} catch (SmsapiException $exception) {
echo 'ERROR: ' . $exception->getMessage();
}
统计信息
- 总下载量: 8.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-15