\DtApp\ThinkLibrary\service\wechatQyService

企业微信 Class QyService

Summary

Methods
Properties
Constants
__construct()
instance()
key()
text()
markdown()
No public properties found
No constants found
initialize()
$app
N/A
sendMsg()
$msgType
$key
N/A

Properties

$app

$app : \think\App

应用实例

Type

\think\App

$msgType

$msgType : string

消息类型

Type

string

$key

$key : 

Type

Methods

__construct()

__construct(\think\App  $app) 

Service constructor.

Parameters

\think\App $app

instance()

instance(array  $args) : static

静态实例对象

Parameters

array $args

Returns

static

key()

key(string  $str) : $this

配置Key

Parameters

string $str

Returns

$this

text()

text(string  $content = '') : boolean

发送文本消息

Parameters

string $content

消息内容

Throws

\DtApp\ThinkLibrary\exception\DtaException

Returns

boolean

markdown()

markdown(string  $content = '') : boolean

发送markdown消息

Parameters

string $content

消息内容

Throws

\DtApp\ThinkLibrary\exception\DtaException

Returns

boolean

initialize()

initialize() : $this

初始化服务

Returns

$this

sendMsg()

sendMsg(array  $data) : boolean

组装发送消息

Parameters

array $data

消息内容数组

Throws

\DtApp\ThinkLibrary\exception\DtaException

Returns

boolean