-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Łukasz Duda
committed
Apr 19, 2016
1 parent
8c52fc7
commit 83511b7
Showing
2 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
# smsapi-bundle | ||
# 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(); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ | |
"description" : "Symfony 2 Bundle for SMSApi PHP Client library.", | ||
"type" : "symfony-bundle", | ||
"authors" : [{ | ||
"name" : "", | ||
"email" : "" | ||
"name" : "KredytyChwilowkiProgrammer", | ||
"email" : "[email protected]" | ||
}], | ||
"keywords" : ["sms", "mms", "vms", "bundle"], | ||
"license" : [ | ||
"" | ||
"MIT" | ||
], | ||
"require" : { | ||
"php": ">=5.3.0", | ||
|