Constants

EVENT_TYPE_SUBSCRIBE

EVENT_TYPE_SUBSCRIBE = 'subscribe'

EVENT_TYPE_UNSUBSCRIBE

EVENT_TYPE_UNSUBSCRIBE = 'unsubscribe'

EVENT_TYPE_UNSUBSCRIBE_SCAN

EVENT_TYPE_UNSUBSCRIBE_SCAN = 'subscribe'

EVENT_TYPE_SUBSCRIBE_SCAN

EVENT_TYPE_SUBSCRIBE_SCAN = 'SCAN'

EVENT_TYPE_LOCATION

EVENT_TYPE_LOCATION = 'LOCATION'

EVENT_TYPE_EVENT

EVENT_TYPE_EVENT = 'event'

MSG_TYPE_TEXT

MSG_TYPE_TEXT = 'text'

MSG_TYPE_IMAGE

MSG_TYPE_IMAGE = 'image'

MSG_TYPE_VOICE

MSG_TYPE_VOICE = 'voice'

MSG_TYPE_LOCATION

MSG_TYPE_LOCATION = 'location'

MSG_TYPE_SMALL_VIDEO

MSG_TYPE_SMALL_VIDEO = 'shortvideo'

MSG_TYPE_VIDEO

MSG_TYPE_VIDEO = 'video'

REPLY_TYPE_TEXT

REPLY_TYPE_TEXT = 'text'

REPLY_TYPE_IMAGE

REPLY_TYPE_IMAGE = 'image'

REPLY_TYPE_VOICE

REPLY_TYPE_VOICE = 'voice'

REPLY_TYPE_VIDEO

REPLY_TYPE_VIDEO = 'video'

REPLY_TYPE_MUSIC

REPLY_TYPE_MUSIC = 'music'

REPLY_TYPE_NEWS

REPLY_TYPE_NEWS = 'news'

BUTTON_EVENT_TYPE_CLICK

BUTTON_EVENT_TYPE_CLICK = 'CLICK'

BUTTON_EVENT_TYPE_VIEW

BUTTON_EVENT_TYPE_VIEW = 'VIEW'

BUTTON_EVENT_TYPE_SCANCODE_PUSH

BUTTON_EVENT_TYPE_SCANCODE_PUSH = 'scancode_push'

BUTTON_EVENT_TYPE_SCANCODE_WAITMSG

BUTTON_EVENT_TYPE_SCANCODE_WAITMSG = 'scancode_waitmsg'

BUTTON_EVENT_TYPE_PIC_SYSPHOTO

BUTTON_EVENT_TYPE_PIC_SYSPHOTO = 'pic_sysphoto'

BUTTON_EVENT_TYPE_PIC_PHOTO_OR_ALBUM

BUTTON_EVENT_TYPE_PIC_PHOTO_OR_ALBUM = 'pic_photo_or_album'

BUTTON_EVENT_TYPE_PIC_WEIXIN

BUTTON_EVENT_TYPE_PIC_WEIXIN = 'pic_weixin'

BUTTON_EVENT_TYPE_LOCATION_SELECT

BUTTON_EVENT_TYPE_LOCATION_SELECT = 'location_select'

Properties

$appid

$appid : 

Type

$appsecret

$appsecret : 

Type

$message

$message : 

Type

$api_uri

$api_uri : 

Type

$access_token

$access_token : 

Type

$errcode

$errcode : 

Type

Methods

isTextMsg()

isTextMsg() : boolean

文本消息

Returns

boolean

isImageMsg()

isImageMsg() : boolean

图像消息

Returns

boolean

isVoiceMsg()

isVoiceMsg() : boolean

语音消息

Returns

boolean

isLocationMsg()

isLocationMsg() : boolean

地址消息

Returns

boolean

isLinkMsg()

isLinkMsg() : boolean

链接消息

Returns

boolean

isVideoMsg()

isVideoMsg() : boolean

视频消息

Returns

boolean

isSmallVideoMsg()

isSmallVideoMsg() : boolean

小视频消息

Returns

boolean

text()

text(  $content) 

回复文本消息

Parameters

$content

image()

image(  $media_id) 

回复图片消息

Parameters

$media_id

voice()

voice(  $media_id) 

回复语音消息

Parameters

$media_id

video()

video(  $video) 

回复视频消息

Parameters

$video

music()

music(  $music) 

回复音乐消息

Parameters

$music

news()

news(  $news) 

回复图文信息

Parameters

$news

isSubscribeEvent()

isSubscribeEvent() : boolean

关注

Returns

boolean

isUnSubscribeEvent()

isUnSubscribeEvent() : boolean

取消关注

Returns

boolean

isSubscribeScanEvent()

isSubscribeScanEvent() : boolean

未关注用户扫描二维码

Returns

boolean

isScanEvent()

isScanEvent() : boolean

已关注用户扫描二维码

Returns

boolean

isLocationEvent()

isLocationEvent() : boolean

上报地理位置事件

Returns

boolean

sendAll()

sendAll(  $data) : mixed

群发消息正式发送

Parameters

$data

Returns

mixed

preview()

preview(  $data) : mixed

群发消息预览发送

Parameters

$data

Returns

mixed

delMassMessage()

delMassMessage(  $data) : mixed

删除群发消息

Parameters

$data

Returns

mixed

getMassMessageState()

getMassMessageState(  $data) : mixed

查询群发消息发送状态

Parameters

$data

Returns

mixed

isMassMessage()

isMassMessage() : boolean

群发消息推送事件

Returns

boolean

__construct()

__construct() 

instance()

instance(string  $api) : mixed

获取实例

Parameters

string $api

Returns

mixed

getMessage()

getMessage() : mixed

获取消息

Returns

mixed

setMessage()

setMessage() : boolean

获取微信发来的消息

Returns

boolean

__get()

__get(  $name) 

Parameters

$name

getMessageType()

getMessageType() : mixed

获取消息类型

Returns

mixed

getAccessToken()

getAccessToken() : string

获取access_token

Returns

string

setAccessToken()

setAccessToken(boolean  $force = false) 

设置access_token

Parameters

boolean $force

是否强制刷新access_token

Throws

\Exception

valid()

valid() : boolean

微信接口整合验证进行绑定

Returns

boolean

get()

get(array|mixed  $response) : array

根据微信服务器返回信息,验证是否发生错误 如果有错误时根据errcode值返回具体错误内容

Parameters

array|mixed $response

Returns

array