\johnxu\wechatBase

Class Base

Summary

Methods
Properties
Constants
get()
__construct()
instance()
getMessage()
setMessage()
__get()
getMessageType()
getAccessToken()
setAccessToken()
valid()
$appid
$appsecret
$message
$api_uri
$access_token
No constants found
No protected methods found
$errcode
N/A
No private methods found
No private properties found
N/A

Properties

$appid

$appid : 

Type

$appsecret

$appsecret : 

Type

$message

$message : 

Type

$api_uri

$api_uri : 

Type

$access_token

$access_token : 

Type

$errcode

$errcode : 

Type

Methods

get()

get(array|mixed  $response) : array

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

Parameters

array|mixed $response

Returns

array

__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