\WeChat\ContractsBasicPushEvent

微信通知处理基本类 Class BasicPushEvent

Summary

Methods
Properties
Constants
__construct()
reply()
getReceive()
getOpenid()
getMsgType()
getMsgId()
getMsgTime()
getToOpenid()
No public properties found
No constants found
No protected methods found
$appid
$postxml
$encryptType
$config
$params
$receive
$message
N/A
checkSignature()
No private properties found
N/A

Properties

$appid

$appid : string

公众号APPID

Type

string

$postxml

$postxml : string

公众号推送XML内容

Type

string

$encryptType

$encryptType : string

公众号推送加密类型

Type

string

$message

$message : array

准备回复的消息内容

Type

array

Methods

__construct()

__construct(array  $options) 

BasicPushEvent constructor.

Parameters

array $options

Throws

\WeChat\Exceptions\InvalidResponseException

reply()

reply(array  $data = array(), boolean  $return = false) : string

回复消息

Parameters

array $data

消息内容

boolean $return

是否返回XML内容

Throws

\WeChat\Exceptions\InvalidDecryptException

Returns

string

getReceive()

getReceive(null|string  $field = null) : array

获取公众号推送对象

Parameters

null|string $field

指定获取字段

Returns

array

getOpenid()

getOpenid() : string

获取当前微信OPENID

Returns

string

getMsgType()

getMsgType() : string

获取当前推送消息类型

Returns

string

getMsgId()

getMsgId() : string

获取当前推送消息ID

Returns

string

getMsgTime()

getMsgTime() : integer

获取当前推送时间

Returns

integer

getToOpenid()

getToOpenid() : string

获取当前推送公众号

Returns

string

checkSignature()

checkSignature(string  $str = '') : boolean

验证来自微信服务器

Parameters

string $str

Returns

boolean