2017 © Pedro Peláez
 

library sms

Provider neutral SMS library.

image

litgroup/sms

Provider neutral SMS library.

  • Wednesday, January 17, 2018
  • by Sharom
  • Repository
  • 1 Watchers
  • 0 Stars
  • 490 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

SMS

🚫 This project is no longer maintained., (*1)

Provider neutral SMS library for PHP 5.5+, (*2)

Version Dev Version License Downloads Build Status, (*3)

Read the documentation for the last release here., (*4)

Installation

composer require litgroup/sms=0.6.*

Example of usage

Message sending

use LitGroup\Sms\Message;
use LitGroup\Sms\MessageService;
use LitGroup\Sms\Exception\SmsException;

// Some implementation of `LitGroup\Sms\Gateway\GatewayInterface`
$gateway = new SomeGateway();

// Create Short Message Service
$messageService = new MessageService($gateway);

// Create and send some message.
try {
    $messageService->sendMessage(
        'Hello, customer!',
        ['+79991234567'],
        'AcmeCompany'
    );
} catch (SmsException $e) {
    // ...
}

Use cascade of gateways

It's possible to use cascade of gateways of several providers to improve fault-tolerance. Use LitGroup\Sms\Gateway\CascadeGateway., (*5)

$cascadeGateway = new CascadeGateway([
    new AGateway(),
    new BGateway(),
]);

$messageService = new MessageService($cascadeGateway);

Logging of exceptions

  • Constructor of MessageService receives Psr\Log\LoggerInterface.
  • If you use CascadeGateway then inject a logger into the instance of CascadeGateway too. Warnings will be logged if some of gateways are inoperative.

The Versions

17/01 2018

dev-master

9999999-dev

Provider neutral SMS library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

sms short message

14/06 2016

v0.6.0

0.6.0.0

Provider neutral SMS library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

sms short message

16/12 2015

v0.5.0

0.5.0.0

Short messaging library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by LitGroup Team

15/12 2015

v0.4.0

0.4.0.0

Short messaging library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by LitGroup Team

15/12 2015

v0.3.0

0.3.0.0

Short messaging library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by LitGroup Team

14/12 2015

v0.2.1

0.2.1.0

Short messaging library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by LitGroup Team

14/12 2015

v0.2.0

0.2.0.0

Short messaging library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by LitGroup Team

10/12 2015

v0.1.0

0.1.0.0

Short messaging library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by LitGroup Team