yvesniyo/intouch-sms
Composer 安装命令:
composer require yvesniyo/intouch-sms
包简介
This is a php library to help developers include sms service, with IntouchSms gateway from RWANDA
README 文档
README
This is a php library to help developers include sms service, with IntouchSms gateway from RWANDA
Installation
Install this package as a dependency using Composer.
composer require yvesniyo/intouch-sms
Usage
This is the documantion
use Yvesniyo\IntouchSms\SmsSimple; /** @var \Yvesniyo\IntouchSms\SmsSimple */ $sms = new SmsSimple(); $sms->recipients(["250780588642","0720710379"]) ->message("Hello world") ->sender("intouchSenderId") ->username("intouchUsername") ->password("intouchPassword") ->apiUrl("www.intouchsms.co.rw/api/sendsms/.json") ->callBackUrl(""); print_r($sms->send());
That code works well, however it does call some static parameters such as senderId,Username,Password,ApiUrl and CallbackUrl. we can solve this by creating another class Called Sms which extends SmsAbstract
class Sms extends SmsAbstract { public function __construct() { parent::__construct(); // } public function configSender(): string { return "intouchSenderId"; } public function configUsername(): string { return "intouchUsername"; } public function configPassword(): string { return "intouchPassword"; } public function configApiUrl(): string { return "www.intouchsms.co.rw/api/sendsms/.json"; } public function configCallBackUrl(): string { return ""; } public static function QuickSend($recipients, String $message, String $senderId = null) { $sms = new Sms(); $sms->requiredData($recipients, $message, $senderId); return $sms->send(); } }
After creating this class you can now use simple codes like
$sms = new Sms(); // first parameter is recipients and second one is message $sms->requiredData(["250780588642","0720710379"], "wassup"); print_r($sms->send());
NB: For some people who are not using composer remember to add:
include_once("../vendor/autoload.php");
Contributing
Contributions are welcome! Before contributing to this project, familiarize yourself with CONTRIBUTING.md.
To develop this project, you will need PHP 7.4 or greater, Composer,
After cloning this repository locally, execute the following commands:
cd /path/to/repository
composer install
Now, you are ready to develop!
Copyright and License
The yvesniyo/intouch-sms library is free and unencumbered software released into the public domain. Please see UNLICENSE for more information.
yvesniyo/intouch-sms 适用场景与选型建议
yvesniyo/intouch-sms 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 84 次下载、GitHub Stars 达 4, 最近一次更新时间为 2021 年 03 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「library」 「sms」 「rwanda」 「intouch」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 yvesniyo/intouch-sms 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yvesniyo/intouch-sms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 yvesniyo/intouch-sms 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Inbox pattern process implementation for your Laravel Applications
SDK for payment gateway PlatbaMobilom.sk for PHP7.0
Extensible library for building notifications and sending them via different delivery channels.
Core library that defines common interfaces used by the rest of the intahwebz..
yii2-sms expand
Amqp classes
统计信息
- 总下载量: 84
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unlicense
- 更新时间: 2021-03-08