Symfony2 bundle to interact with smssender
Go to file
2018-06-11 04:34:34 +00:00
Command Moved login parameter fetching to the service itself 2012-11-04 15:14:27 +01:00
DependencyInjection Created basic functionality. May be buggy sometimes yet. 2012-10-07 01:35:20 +02:00
Model What the hell happened? o_O 2012-10-08 20:45:50 +02:00
Resources/config Created basic functionality. May be buggy sometimes yet. 2012-10-07 01:35:20 +02:00
Service Now throwing an exception if login fails. 2012-12-20 19:13:08 +01:00
composer.json Updated composer dependencies 2012-11-25 16:22:35 +01:00
composer.lock Created empty repository with empty bundle 2012-10-07 00:17:30 +02:00
GergelyPolonkaiSmsSenderBundle.php Created basic functionality. May be buggy sometimes yet. 2012-10-07 01:35:20 +02:00
README.md Update 'README.md' 2018-06-11 04:34:34 +00:00

No Maintenance Intended

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 to send SMS messages through gergelypolonkai/smsgateway.

Installation

Simply add gergelypolonkai/smssender-bundle to your Symfony2 project's composer.json file, and run

php composer.phar update

Configuration

Everything is configurable through the Symfony project's configuration files. In YML format, the possibilities are:

gergely_polonkai_sms_sender:

    # This must be set, as it has no default value
    sender_url: http://localhost/smsgateway

    # The username/password to use to login to SmsGateway. No default values
    # are available, either
    username: gateway-user
    password: gateway-password

    # This defaults to true. You should set this to false if you use
    # self-signed certificates
    verify_ssl: true

    # This is the default value. Currently SmsGateway requires this to be
    # be set to application/json
    content_type: application/json

    # The content-encoding of the data you send to the server. This must be
    # UTF-8 if you want to send an SMS with non-ascii characters.
    content-encoding: utf-8

    # This should be turned on only for debugging purposes. It makes CURL to
    # log every traffic it makes with SmsGateway.
    verbose_curl: false

Usage

Everything is done via the gergely_polonkai_sms_sender.sender service:

$sender = $container->get('gergely_polonkai_sms_sender.sender');
$sender->login();
$sender->send('+155523456789', 'Hello world!', array());
$sender->logout();