Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MvFreeSmsApiBundle

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...

About

Bundle Symfony2 to use Free SMS api

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages