承接 massimo-filippi/sms-module 相关项目开发

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

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

massimo-filippi/sms-module

Composer 安装命令:

composer require massimo-filippi/sms-module

包简介

ZF3 module for SMS communication

README 文档

README

ZF3 module for SMS communication

Packagist License

Introduction

There will be more info soon...

Installation

1. Install via Composer

Install the latest stable version via Composer:

composer require massimo-filippi/sms-module

Install the latest develop version via Composer:

composer require massimo-filippi/sms-module:dev-master

2. Enable module in your application

Composer should enable MassimoFilippi\SmsModule in your project automatically during installation.

In case it does not, you can enable module manually by adding value 'MassimoFilippi\SmsModule' to array in file config/modules.config.php. At the end, it should look like PHP array below.

<?php

return [
    'Zend\Router',
    'Zend\Validator',
    'MassimoFilippi\SmsModule', // Add this line, ideally before Application module.
    'Application',
];

3. Set up your configuration

You have to set settings for SmsService, otherwise you will not be able to use it.

Here is what I have in my config/autoload/local.php file.

Warning: DO NOT set passwords in files that are versioned!

<?php

return [
    'massimo_filippi' => [
        'sms_module' => [
            'adapter' => \MassimoFilippi\SmsModule\Adapter\SmsApiCom\SmsApiComAdapter::class,
            'adapter_params' => [
                'api_username' => 'john.doe',
                'api_password_hash' => '1234567890', // MD5 hash of password in case of SMSApi
            ],
        ],
    ],
];

Usage

Somewhere in business logic classes.

<?php 

use MassimoFilippi\SmsModule\Message\Message as SmsMessage;

$smsMessage = new SmsMessage();

$smsMessage->setTo('00420123456789');
$smsMessage->setText('Hello World!');

try {
    // Injected MassimoFilippi\SmsModule\Service\SmsService.
    $this->smsService->sendSMS($smsMessage);
} catch (\Exception $exception) {
    var_dump($exception->getMessage());
}

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固