mv/free-sms-api-bundle

Bundle SF2 that use library api free mobile sending SMS

1.0.0 2015-07-26 13:47 UTC

This package is auto-updated.

Last update: 2024-03-29 03:03:43 UTC


README

This bundle is for sending notification to your Free Mobile (Require Free Mobile account with api key)

SensioLabsInsight

Install

composer.phar require mv/free-sms-api-bundle

Configuration

Add to your AppKernel

$bundles[] = new Mv\FreeSmsApiBundle\MvFreeSmsApiBundle();

Add to config.yml

mv_free_sms_api:
    users:
        phpmike:
            free_user_id: YOUR USER ID FREE MOBILE
            free_user_api_key: YOUR API KEY FREE MOBILE
        other:
            free_user_id: OTHER USER ID FREE MOBILE
            free_user_api_key: OTHER API KEY FREE MOBILE

Examples

$this->get('mv_free_sms_api.sender.phpmike')
            ->addMessage('Test de ce bundle :-)')
            ->send();
// Something append in your script
$this->get('mv_free_sms_api.sender.phpmike')->addMessage('There is something wrong with that!');

// Something else append in your script
$this->get('mv_free_sms_api.sender.phpmike')->addMessage('There is something wrong with that other!');
$this->get('mv_free_sms_api.sender.other')->addMessage('There is something wrong with that other!');
// Same as
$this->get('mv_free_sms_api.sender.all')->addMessage('There is something wrong with that other!');
// Same as
$this->get('mv_free_sms_api.sender.all')->addMessageTo('There is something wrong with that other!', array('phpmike', 'other');


// Send messages
$this->get('mv_free_sms_api.sender.all')->send();

Be carreful, this throw "Mv\FreeSmsApi\Exception\FailedException" when something went wrong.

Enjoy it!

To be continued...