2017 © Pedro Peláez
 

library mobilant

Utility class for the mobilant sms service

image

econic/mobilant

Utility class for the mobilant sms service

  • Friday, June 10, 2016
  • by econic
  • Repository
  • 1 Watchers
  • 0 Stars
  • 217 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

About

Mobilant is an ideal platform for sending sms, using this very simple API., (*1)

This is a composer package for using the Mobilant REST API. Have a look at their API docs for more details about all the parameters., (*2)

minimum configuration

Fastest possible usage for PHP 5.4+ using chaining for a fluent interface, (*3)

(new \Econic\Mobilant\SMS)
    ->setKey('myTokenKey123')
    ->setMessage('hello world')
    ->setTo('0049987123456')
    ->setFrom('Bob')
    ->setRoute('lowcostplus')
    ->send();

Fastest possible usage for < PHP 5.4 and without using chaining, (*4)

$mobilant = new \Econic\Mobilant\SMS();
$mobilant->setKey('myTokenKey123');
$mobilant->setMessage('hello world');
$mobilant->setTo('0049987123456');
$mobilant->setFrom('Bob');
$mobilant->setRoute('lowcostplus');
$mobilant->send();

Methods

Every setter returns the object again to enable chaining and has a respective getter, (*5)

setKey Your app API key, (*6)

setMessage The message of the sms, (*7)

setTo The receiver's phone number, (*8)

setFrom The sender name, (*9)

setRoute The route to choose, (*10)

setCharset The encoding of the string you pass into setMessage() and setFrom(), (*11)

setRef The reference to save with the message, (*12)

setConcat If the message should be concatenated when > 160 chars, (*13)

setSenddate The date to send if you want to time it for later, (*14)

setDebug If you want to act as if you'd drop a message but don't want it to be sent, (*15)

send Send the text message, (*16)

Returns array with two indexes:, (*17)

'success' => true if the message was sent successfully, otherwise false, (*18)

'response' => An array with the data returned by the mobilant api if the message was sent successfully, otherwise null. Indexes are responsecode, message_id, cost, count, (*19)

The Versions

10/06 2016

dev-master

9999999-dev https://github.com/econic/Mobilant.git

Utility class for the mobilant sms service

  Sources   Download

MIT

sms utility mobilant

10/06 2016

0.3.0

0.3.0.0 https://github.com/econic/Mobilant.git

Utility class for the mobilant sms service

  Sources   Download

MIT

sms utility mobilant

21/07 2014

0.2.0

0.2.0.0 https://github.com/econic/Mobilant.git

Utility class for the mobilant sms service

  Sources   Download

MIT

sms utility mobilant

11/04 2014

0.1.0

0.1.0.0 https://github.com/econic/Mobilant.git

Utility class for the mobilant sms service

  Sources   Download

MIT

sms utility mobilant