承接 stanislav-web/phalcon-sms-factory 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stanislav-web/phalcon-sms-factory

Composer 安装命令:

composer require stanislav-web/phalcon-sms-factory

包简介

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

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status Total Downloads Latest Stable Version Phalconist License

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

In Future

- Support SMS mass mailing

[v 1.2.3-stable] 2015-04-15

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

[v 1.2.2-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

- Add response debugger (Show server response headers)

[v 1.0-beta] 2015-02-06

- Sending SMS use multiple providers

Compatible

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

System requirements

  • PHP 5.4 >
  • Phalcon extension 1.3.x
  • PHP libcurl or Stream Socket client

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

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:

<?php
    // add to your app config and write down your settings .The key 'sms' is required
    'sms'   =>  [
    
                'Nexmo'         =>  [
                    'from'      => '',
                    'api_key'   => '',
                    'api_secret'=> '',
                    'type'      => '',
                    'request_method' => ''
                ],
                'BulkSMS'   =>  [
                    'username'  => '',
                    'password'  => '',
                ],
                'SmsAero' => [
                    'from'          => '',
                    'user'          => '',
                    'password'      => '',
                ],
                
                'SmsUkraine'       =>  [
                    'from'          => '',
                    'login'         => '',
                    'password'      => '',
                    'version'       => '',
                ],
                
                'SMSC'       =>  [
                    'login'     => '',
                    'psw'       => '',
                    'charset'   => '',
                    'sender'    => '',
                ],
        
                'SMSRu' => [
                    'api_id'    => ''
                ],
                
                'Clickatell'    => [
                    'api_id'    => '',
                    'user'      => '',
                    'password'  => '',
                    'from'      => '',
                    'request_method' => ''
                ],
                'MessageBird'   => [
                    'originator'   => '',
                    'access_key'   => '',
                    'request_method' => ''
                ]           
    ];

Send SMS and view balance

Now you can call your created service of sending sms.

<?php

    // get sms service
    $sms = $this->di->get('SMS');

    // send message via SmsAero (available 7 providers)
    $response = $sms->call('SmsAero')->setRecipient('NUMBER')->send('MESSAGE'));

    // get balance of SmsAero account
    $response = $sms->call('SmsAero')->balance();

    // use debug to show headers
    $response = $sms->call('SmsProvider')->debug(true)->setRecipient('NUMBER')->send('MESSAGE'));
    $response = $sms->call('SmsProvider')->debug(true)->balance();

Unit Test

Also available in /phpunit directory. Run command to start

phpunit --configuration phpunit.xml.dist --coverage-text

##Change Log

Contributing and development

I have enclosed instructions API and related classes Diagram.

I am accept bug reports, new feature requests and pull requests in GitHub.

If you have a question about how to use this service, please see this README.

If you have a change or new feature in mind, please see this README again and follow DRI (development rules interfaces).

You can add new providers following interfaces:

You can add own or choise exists of request's client. Also available:

##Issues

stanislav-web/phalcon-sms-factory 适用场景与选型建议

stanislav-web/phalcon-sms-factory 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 1.58k 次下载、GitHub Stars 达 31, 最近一次更新时间为 2015 年 02 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「phalcon」 「phalcon sms」 「phalcon sms providers」 「phalcon send sms」 「phalcon sms service」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 stanislav-web/phalcon-sms-factory 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 stanislav-web/phalcon-sms-factory 我们能提供哪些服务?
定制开发 / 二次开发

基于 stanislav-web/phalcon-sms-factory 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 18
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 31
  • Watchers: 8
  • Forks: 6
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-02