digitalturbo/blackhole

小程序模板模板发送中间件

dev-master 2019-02-21 11:37 UTC

This package is not auto-updated.

Last update: 2024-05-25 07:28:52 UTC


README

安装

composer require digitalturbo/blackhole

示例

use DigitalTurbo\BlackHole\Piston;

$url = "http://blackhole.digiturbo.cn/api/v1/message/tpsend';
$piston = new Piston();
$res    = $model->init($appId,$appSecret, $this->logPath, $debugType)
            ->send($url, ['321', '321'])
            ->go(false);


方法

@method init(string $appId,string $appSecret,$logPath,$logLevel)

所有参数不能为空

参数说明
$appId小程序appid
$appSecret小程序密钥
$logPath日志文件路径
$logLevel日志级别 默认 ERROR

@method send(string $url,array $userArr)

所有参数不能为空

参数说明
$urlurl
$userArr参数数据

@method go(bool $async)

当 $async 为真时,

参数是否有默认值说明
$async = truetrue异步执行请求,默认值;无返回值
$async = falsefalse有返回值,返回请求信息