PHPackages                             stanislav-web/phalcon-sms-factory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stanislav-web/phalcon-sms-factory

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stanislav-web/phalcon-sms-factory
=================================

Multiple gateway SMS Sender factory. Provide any SMS services inside your Phalcon's projects

1.2.3-stable(11y ago)321.6k6[2 issues](https://github.com/stanislav-web/phalcon-sms-factory/issues)MITHTMLPHP &gt;=5.4.0

Since Feb 7Pushed 10y ago8 watchersCompare

[ Source](https://github.com/stanislav-web/phalcon-sms-factory)[ Packagist](https://packagist.org/packages/stanislav-web/phalcon-sms-factory)[ Docs](https://github.com/stanislav-web/phalcon-sms-factory)[ RSS](/packages/stanislav-web-phalcon-sms-factory/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (10)Used By (0)

Multiple SMS Sender factory
===========================

[](#multiple-sms-sender-factory)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/99087a0eaf548dcf5b9798b275da4db27a64ff54e11c86c5ce7bc805fa5b14ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7374616e69736c61762d7765622f7068616c636f6e2d736d732d666163746f72792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stanislav-web/phalcon-sms-factory/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/442bfb9223b841d26cfc5965b906a6ecc51e45b5787e3f7cfb0075b8ba2555db/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7374616e69736c61762d7765622f7068616c636f6e2d736d732d666163746f72792f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stanislav-web/phalcon-sms-factory/?branch=master) [![Build Status](https://camo.githubusercontent.com/bb20820562b16d4baf9607cabd5e4ef79a7b9d494b8ef104c9ba56189754f68b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7374616e69736c61762d7765622f7068616c636f6e2d736d732d666163746f72792f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stanislav-web/phalcon-sms-factory/build-status/master) [![Total Downloads](https://camo.githubusercontent.com/36713219352daba7c23142b20ca78a444b79b25ac0428f0cda510c5616ffc68a/68747470733a2f2f706f7365722e707567782e6f72672f7374616e69736c61762d7765622f7068616c636f6e2d736d732d666163746f72792f646f776e6c6f6164732e737667)](https://packagist.org/packages/stanislav-web/phalcon-sms-factory) [![Latest Stable Version](https://camo.githubusercontent.com/17efef33c47f8c1b3017241c573280395a65cd6485b0e06c9f297e3dc417568c/68747470733a2f2f706f7365722e707567782e6f72672f7374616e69736c61762d7765622f7068616c636f6e2d736d732d666163746f72792f762f737461626c652e737667)](https://packagist.org/packages/stanislav-web/phalcon-sms-factory) [![Phalconist](https://camo.githubusercontent.com/e0b3ea99c1d8b25682bd9b8b96ebbceb3d16df0a3130b87de4ccf5917994d383/687474703a2f2f7068616c636f6e6973742e636f6d2f7374616e69736c61762d7765622f7068616c636f6e2d736d732d666163746f72792f64656661756c742e737667)](http://phalconist.com/stanislav-web/phalcon-sms-factory) [![License](https://camo.githubusercontent.com/f86d879b3f92405aa2d715179823f99ba1cf3671c3d99f7aa5483680295b5016/68747470733a2f2f706f7365722e707567782e6f72672f7374616e69736c61762d7765622f7068616c636f6e2d736d732d666163746f72792f6c6963656e73652e737667)](https://packagist.org/packages/stanislav-web/phalcon-sms-factory)

Description
-----------

[](#description)

This service makes SMS through a variety of providers. You can easily implement your own providers using the interface design. At the moment, provides an interface to send and check your balance for the next:

```
- BulkSMS
- Clickatell
- MessageBird
- Nexmo
- SmsAero
- SMSC
- SmsUkraine
- SMS.ru

```

Change Log
----------

[](#change-log)

#### In Future

[](#in-future)

```
- Support SMS mass mailing

```

#### \[v 1.2.3-stable\] 2015-04-15

[](#v-123-stable-2015-04-15)

```
- Add single error handler
- Add SMS.ru provider
- Send SMS Unit Tests

```

#### \[v 1.2.2-beta\] 2015-02-08

[](#v-122-beta-2015-02-08)

```
- Add view balance
- Add development info (API) / UML
- Reformat to PSR-1/PSR-2

```

#### \[v 1.1-beta\] 2015-02-07

[](#v-11-beta-2015-02-07)

```
- Add response debugger (Show server response headers)

```

#### \[v 1.0-beta\] 2015-02-06

[](#v-10-beta-2015-02-06)

```
- Sending SMS use multiple providers

```

Compatible
----------

[](#compatible)

- PSR-0, PSR-1, PSR-2, PSR-4 Standards

System requirements
-------------------

[](#system-requirements)

- PHP 5.4 &gt;
- Phalcon extension 1.3.x
- PHP libcurl or Stream Socket client

Install
-------

[](#install)

First update your dependencies through composer. Add to your composer.json:

```
"require": {
    "stanislav-web/phalcon-sms-factory": "1.2.*@stable",
}
```

Then run to update dependency and autoloader

```
php composer.phar update
php composer.phar install
```

or just

```
php composer.phar require stanislav-web/phalcon-sms-factory 1.2.*@stable

```

*(Do not forget to include the composer autoloader)*

You can create an injectable service

```
    $di->set('SMS', function () use ($di) {

        return new SMSFactory\Sender($di);
    });
```

Usage
-----

[](#usage)

#### Configure providers

[](#configure--providers)

SMS services have a variety of settings, both mandatory and optional. You can select them in the global configuration file of your project. I intentionally did not make the settings in each provider, as this service will be maintained and no time to change. Therefore, when updating via the composer, your settings will not be overwritten, if you will be making their to global application config. See example:

```
