Ocr
extends BasicWeChat
in
小程序ORC服务 Class Ocr
Table of Contents
$config | 当前微信配置 | DataArray |
---|---|---|
$access_token | 访问AccessToken | string |
$currentMethod | 当前请求方法参数 | array |
$isTry | 当前模式 | bool |
$cache | 静态缓存 | static |
$GetAccessTokenCallback | 注册代替函数 | string |
bankcard() | 本接口提供基于小程序的银行卡 OCR 识别 | array |
businessLicense() | 本接口提供基于小程序的营业执照 OCR 识别 | array |
driverLicense() | 本接口提供基于小程序的驾驶证 OCR 识别 | array |
idcard() | 本接口提供基于小程序的身份证 OCR 识别 | array |
printedText() | 本接口提供基于小程序的通用印刷体 OCR 识别 | array |
vehicleLicense() | 本接口提供基于小程序的行驶证 OCR 识别 | array |
__construct() | BasicWeChat constructor. | mixed |
instance() | 静态创建对象 | static |
getAccessToken() | 获取访问accessToken | string |
setAccessToken() | 设置外部接口 AccessToken | mixed |
delAccessToken() | 清理删除 AccessToken | bool |
httpGetForJson() | 以GET获取接口数据并转为数组 | array |
httpPostForJson() | 以POST获取接口数据并转为数组 | array |
registerApi() | 注册当前请求接口 | mixed |
callPostApi() | 接口通用POST请求方法 | array |
callGetApi() | 接口通用GET请求方法 | array |
Properties
$config
当前微信配置
public
DataArray
$config
$access_token
访问AccessToken
public
string
$access_token
= ''
$currentMethod
当前请求方法参数
protected
array
$currentMethod
= []
$isTry
当前模式
protected
bool
$isTry
= false
$cache
静态缓存
protected
static static
$cache
$GetAccessTokenCallback
注册代替函数
protected
string
$GetAccessTokenCallback
Methods
bankcard()
本接口提供基于小程序的银行卡 OCR 识别
public
bankcard(
$data :
array
)
: array
Parameters
- $data : array
Tags
Return values
arraybusinessLicense()
本接口提供基于小程序的营业执照 OCR 识别
public
businessLicense(
$data :
array
)
: array
Parameters
- $data : array
Tags
Return values
arraydriverLicense()
本接口提供基于小程序的驾驶证 OCR 识别
public
driverLicense(
$data :
array
)
: array
Parameters
- $data : array
Tags
Return values
arrayidcard()
本接口提供基于小程序的身份证 OCR 识别
public
idcard(
$data :
array
)
: array
Parameters
- $data : array
Tags
Return values
arrayprintedText()
本接口提供基于小程序的通用印刷体 OCR 识别
public
printedText(
$data :
array
)
: array
Parameters
- $data : array
Tags
Return values
arrayvehicleLicense()
本接口提供基于小程序的行驶证 OCR 识别
public
vehicleLicense(
$data :
array
)
: array
Parameters
- $data : array
Tags
Return values
array__construct()
BasicWeChat constructor.
public
__construct(
$options :
array
)
: mixed
Parameters
- $options : array
Return values
mixedinstance()
静态创建对象
public
static instance(
$config :
array
)
: static
Parameters
- $config : array
Return values
staticgetAccessToken()
获取访问accessToken
public
getAccessToken(
)
: string
Tags
Return values
stringsetAccessToken()
设置外部接口 AccessToken
public
setAccessToken(
$access_token :
string
)
: mixed
Parameters
- $access_token : string
Tags
Return values
mixeddelAccessToken()
清理删除 AccessToken
public
delAccessToken(
)
: bool
Return values
boolhttpGetForJson()
以GET获取接口数据并转为数组
protected
httpGetForJson(
$url :
string
)
: array
Parameters
- $url : string
接口地址
Tags
Return values
arrayhttpPostForJson()
以POST获取接口数据并转为数组
protected
httpPostForJson(
$url :
string
, $data :
array
[, $buildToJson :
bool
= true ]
)
: array
Parameters
- $url : string
接口地址
- $data : array
请求数据
- $buildToJson : bool = true
Tags
Return values
arrayregisterApi()
注册当前请求接口
protected
registerApi(
&$url :
string
, $method :
string
[, $arguments :
array
= [] ]
)
: mixed
Parameters
- $url : string
接口地址
- $method : string
当前接口方法
- $arguments : array = []
请求参数
Tags
Return values
mixedcallPostApi()
接口通用POST请求方法
public
callPostApi(
$url :
string
, $data :
array
[, $isBuildJson :
bool
= true ]
)
: array
Parameters
- $url : string
接口URL
- $data : array
POST提交接口参数
- $isBuildJson : bool = true
Tags
Return values
arraycallGetApi()
接口通用GET请求方法
public
callGetApi(
$url :
string
)
: array
Parameters
- $url : string
接口URL