此包已被 废弃 并不再维护。未建议替代包。
此包最新版本(0.0.1.1)没有可用的许可证信息。

SMSApi 包装器

0.0.1.1 2017-04-18 12:48 UTC

This package is not auto-updated.

Last update: 2019-01-17 12:51:44 UTC


README

非常简单的短信发送接口

支持的库

  • 发送短信

支持的服务提供商

  • TODO SMSapi.pl

I. 安装

composer require solvenfinance/smsapi

II. API

1. 配置适配器

use SmsApi\SmsApi;

SmsApi::setAdapter(new SmsApiAdapter([
 // ... config in here
]));

2. 发送短信

use SmsApi\SmsApi;
use SmsApi\Message\TextMessage;
use SmsApi\ValueObject\PhoneNumber;
use SmsApi\ValueObject\StringValue;

SmsApi::send(
    new TextMessage(
        PhoneNumber::fromNative(600700800),
        StringValue::fromNative("Hello, recipient. How are you?"),
        StringValue::fromNative("Solven.pl"),
    );
);

版权:Solven Finance sp z o. o.