Compare commits

3 Commits
2.1 ... master

Author SHA1 Message Date
c2992dd1c7 Update 'README.md' 2018-06-11 04:34:34 +00:00
fdde9b5bfa Now throwing an exception if login fails. 2012-12-20 19:13:08 +01:00
Gergely POLONKAI
591cd8aa41 Updated composer dependencies 2012-11-25 16:22:35 +01:00
3 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
SmsSenderBundle [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)
===============
This project is not maintained in any way. Feel free to clone and modify to your own likes, but expect no work on it from my side.
# SmsSenderBundle
This bundle integrates with [gergelypolonkai/smssender](https://github.com/gergelypolonkai/smssender) to send SMS messages through This bundle integrates with [gergelypolonkai/smssender](https://github.com/gergelypolonkai/smssender) to send SMS messages through
[gergelypolonkai/smsgateway](https://github.com/gergelypolonkai/smsgateway). [gergelypolonkai/smsgateway](https://github.com/gergelypolonkai/smsgateway).
@@ -44,7 +47,7 @@ In YML format, the possibilities are:
## Usage ## Usage
Everything is done via the gergely\_polonkai\_sms\_sender.sender service. Everything is done via the `gergely_polonkai_sms_sender.sender` service:
$sender = $container->get('gergely_polonkai_sms_sender.sender'); $sender = $container->get('gergely_polonkai_sms_sender.sender');
$sender->login(); $sender->login();

View File

@@ -38,6 +38,8 @@ class Sender
{ {
if ($this->sender->login($this->container->getParameter('username'), $this->container->getParameter('password')) === true) { if ($this->sender->login($this->container->getParameter('username'), $this->container->getParameter('password')) === true) {
$this->loggedIn = true; $this->loggedIn = true;
} else {
throw new \RuntimeException('Unable to login to gateway!');
} }
} }

View File

@@ -17,7 +17,7 @@
} }
], ],
"require": { "require": {
"symfony/framework-bundle": "2.1.*", "symfony/framework-bundle": "2.*",
"gergelypolonkai/smssender": "dev-master" "gergelypolonkai/smssender": "dev-master"
}, },
"autoload": { "autoload": {