定制 flotz/txtlocal 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

flotz/txtlocal

最新稳定版本:1.0.0

Composer 安装命令:

composer require flotz/txtlocal

包简介

Wrapper for TxtLocal.co.uk

README 文档

README

This is just a Symfony Bundle Wrapper for Text Local with a bit of configuration.

Installation

In your composer.json file, add:

{
    "require": {
        "flotz/txtlocal" : "dev-master"
    }
}

In your app/AppKernel.php file, add:

{
    ...
    new Flotz\TxtLocalBundle\FlotzTxtLocalBundle(),
    ...
}

In your app/config/config.yml:

flotz_txt_local:
    username: your@email.com
    hash: "hash key here as provided by TextLocal"
    test: false # This is optional (default is true)
    apiKey: "api key here as provided by TextLocal" # This is optional

Then update your composer:

$ composer update

Usage

From a symfony controller:

    // Note: $number could be a simple mobile number:
    $number     = '447123123123';

    // or a comma separated serie of numbers:
    $number     = '447123123123, 447500400600';

    // or an array of numbers:
    $number     = array('447123123123', '447500400600');

    // $message is the content of the received SMS
    $message    = 'Thank you for using this bundle';

    // $sender is the name that will appear as a sender
    $sender     = 'Florent';

    $this->get('flotz_txtlocal')->sendSms($number, $message, $sender);
    $balance = $this->get('flotz_txtlocal')->getBalance();

统计信息

  • 总下载量: 466
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

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