PHP Class Thenbsp\Wechat\OAuth\AccessToken

Inheritance: extends Thenbsp\Wechat\Util\Option
Show file Open project: thenbsp/wechat Class Usage Examples

Protected Properties

Property Type Description
$appid 用户 access_token 和公众号是一一对应的

Public Methods

Method Description
__construct ( $appid, array $options ) 构造方法
getAppid ( ) 公众号 appid
getUser ( $lang = 'zh_CN' ) 获取用户信息
isValid ( ) 检测用户 access_token 是否有效
refresh ( ) 刷新用户 access_token

Method Details

__construct() public method

构造方法
public __construct ( $appid, array $options )
$options array

getAppid() public method

公众号 appid
public getAppid ( )

getUser() public method

获取用户信息
public getUser ( $lang = 'zh_CN' )

isValid() public method

检测用户 access_token 是否有效
public isValid ( )

refresh() public method

刷新用户 access_token
public refresh ( )

Property Details

$appid protected property

用户 access_token 和公众号是一一对应的
protected $appid