Property | Type | Description | |
---|---|---|---|
$cachePrefix | string | 数据缓存前缀 | |
$itemTag | the name of the elements that represent the array elements with numeric keys. | ||
$lastError | array | 返回错误码 |
Method | Description | |
---|---|---|
decryptXml ( string $xml, string $messageSignature, string $timestamp, string $nonce ) : string | boolean | 解密XML数据 | |
encryptXml ( string $xml, string $timestamp, string $nonce ) : string | boolean | 加密XML数据 | |
getAccessToken ( boolean $force = false ) : mixed | 获取AccessToken 超时后会自动重新获取AccessToken并触发self::EVENT_AFTER_ACCESS_TOKEN_UPDATE事件 | |
getJsApiTicket ( boolean $force = false ) : mixed | 获取js api ticket 超时后会自动重新获取JsApiTicket并触发self::EVENT_AFTER_JS_API_TICKET_UPDATE事件 | |
getMessageCrypt ( ) : callmez\wechat\sdk\components\MessageCrypt | 设置消息加密处理类 | |
httpGet ( $url, array $options = [] ) : mixed | Http Get 请求 | |
httpPost ( $url, array $postOptions, array $options = [] ) : mixed | Http Post 请求 | |
httpRaw ( $url, $postOptions, array $options = [] ) : mixed | Http Raw数据 Post 请求 | |
jsApiConfig ( array $config = [] ) | 生成js 必要的config | |
parseHttpRequest ( callable $callable, string $url, array | string | null $postOptions = null ) : array | boolean | 解析微信请求响应内容 | |
setAccessToken ( array $accessToken ) | 设置AccessToken | |
setJsApiTicket ( array $jsApiTicket ) | 设置JsApiTicket | |
setMessageCrypt ( callmez\wechat\sdk\components\MessageCrypt $messageCrypt ) | 设置消息加密处理类 | |
xml ( array $data, null $charset = null ) : string | 创建微信格式的XML |
Method | Description | |
---|---|---|
buildXml ( $element, $data ) | ||
createMessageCrypt ( ) : mixed | 创建消息加密类 | |
getCache ( $name ) : mixed | 获取微信缓存数据 | |
getCacheKey ( $name ) : string | 微信数据缓存基本键值 | |
http ( $url, array $options = [] ) : boolean | mixed | Http基础库 使用该库请求微信服务器 | |
httpBuildQuery ( $url, array $options ) : string | Api url 组装 | |
requestAccessToken ( ) : array | boolean | 请求微信服务器获取AccessToken 必须返回以下格式内容 [ 'access_token => 'xxx', 'expirs_in' => 7200 ] | |
requestJsApiTicket ( ) : array | boolean | 请求微信服务器获取JsApiTicket 必须返回以下格式内容 [ 'ticket => 'xxx', 'expirs_in' => 7200 ] | |
setCache ( $name, $value, null $duration = null ) : boolean | 缓存微信数据 | |
uploadFile ( $filePath ) : CURLFile | string | 上传文件请使用该类来解决curl版本兼容问题 |
abstract protected createMessageCrypt ( ) : mixed | ||
return | mixed |
public getAccessToken ( boolean $force = false ) : mixed | ||
$force | boolean | 是否强制获取 |
return | mixed |
abstract protected getCacheKey ( $name ) : string | ||
$name | ||
return | string |
public getJsApiTicket ( boolean $force = false ) : mixed | ||
$force | boolean | 是否强制获取 |
return | mixed |
public getMessageCrypt ( ) : callmez\wechat\sdk\components\MessageCrypt | ||
return | callmez\wechat\sdk\components\MessageCrypt |
protected httpBuildQuery ( $url, array $options ) : string | ||
$url | ||
$options | array | |
return | string |
abstract public jsApiConfig ( array $config = [] ) | ||
$config | array |
abstract protected requestAccessToken ( ) : array | boolean | ||
return | array | boolean |
abstract protected requestJsApiTicket ( ) : array | boolean | ||
return | array | boolean |
public setAccessToken ( array $accessToken ) | ||
$accessToken | array |
public setJsApiTicket ( array $jsApiTicket ) | ||
$jsApiTicket | array |
public setMessageCrypt ( callmez\wechat\sdk\components\MessageCrypt $messageCrypt ) | ||
$messageCrypt | callmez\wechat\sdk\components\MessageCrypt |
protected uploadFile ( $filePath ) : CURLFile | string | ||
$filePath | ||
return | CURLFile | string |
public $itemTag |