Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nobiles2/smsapi-bundle
Symfony 2 bundle dla biblioteki SMSApi PHP Client.
https://github.com/nobiles2/smsapi-bundle
php sms sms-api sms-messages smsapi-bundle symfony symfony-bundle
Last synced: 12 days ago
JSON representation
Symfony 2 bundle dla biblioteki SMSApi PHP Client.
- Host: GitHub
- URL: https://github.com/nobiles2/smsapi-bundle
- Owner: Nobiles2
- License: mit
- Created: 2015-10-15T07:21:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-01T07:48:56.000Z (over 8 years ago)
- Last Synced: 2024-12-14T09:31:50.201Z (about 1 month ago)
- Topics: php, sms, sms-api, sms-messages, smsapi-bundle, symfony, symfony-bundle
- Language: PHP
- Size: 3.91 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kch/smsapi-bundle
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](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();
}
```