andrewboy / see-me
此包最新版本(1.0.1)没有提供许可证信息。
SeeMe SMS 发送器的辅助类。
1.0.1
2017-05-24 14:17 UTC
Requires
- php: >=5.5.9
Requires (Dev)
- fabpot/php-cs-fixer: ^1.10
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2024-09-15 01:55:59 UTC
README
此包是向 SeeMe 发送 API 调用的辅助工具。
安装
composer require andrewboy/see-me
SeeMeGateway 类
格式类型
- 'json'
- 'string'
- 'xml'
方法类型
- 'curl'
- 'file_get_contents'
方法
__consrtuct
params
-
$apiKey: 应用程序密钥
- 类型: 字符串
- 必需: 是
-
$logFileDestination: 设置日志文件目的地。如果为 false,则不记录日志
- 类型: 字符串|布尔值
- 必需: 否
- 默认: false
-
$format: 结果格式
- 类型: 字符串
- 必需: 否
- 默认: 'json'
-
$method: 设置方法类型
- 类型: 字符串
- 必需: 否
- 默认: 'curl'
返回
- void
setApiKey
params
- $apiKey: 应用程序密钥
- 类型: 字符串
- 必需: 是
返回
- void
setFormat
params
- $format: 设置结果格式
- 类型: 字符串
- 必需: 是
返回
- void
setMethod
params
- $method: 设置方法类型
- 类型: 字符串
- 必需: 是
返回
- void
setLogFileDestination
params
- $logFileDestination: 设置日志目的地。必须是字符串 "destination" 或布尔值 false(如果不想记录日志)
- 类型: 字符串|布尔值
- 必需: 是
返回
- void
sendSMS
params
-
$number: 手机号码,格式: /^36(20|30|31|70)\d{7}$/
- 类型: 字符串
- 必需: 是
-
$message: 短信消息
- 类型: 字符串
- 必需: 是
-
$sender: 发送者 ID(手机号码)
- 类型: 字符串|null
- 必需: 否
- 默认: null(在 SeeMe 管理面板中设置的号码)
-
$reference
- 类型: 字符串|null
- 必需: 否
- 默认: null
-
$callbackParams
- 类型: 字符串|null
- 必需: 否
- 默认: null
-
$callbackURL
- 类型: 字符串|null
- 必需: 否
- 默认: null
返回
- 数组
getBalance
返回
- 数组
setIP
params
- $ip
- 类型: 字符串
- 必需: 是
返回
- 数组
getResult
返回
- 数组
getLog
返回
- 字符串