PHP Class LaneWeChat\Core\Wechat

Author: lane Date: 14-03-03 Time: 上午10:20 Mail: [email protected] Website: http://www.lanecn.com
Show file Open project: lixuancn/lanewechat Class Usage Examples

Public Methods

Method Description
__construct ( string $token, boolean $debug = FALSE ) 初始化,判断此次请求是否为验证请求,并以数组形式保存
checkSignature ( )
run ( ) : void 分析消息类型,并分发给对应的函数

Protected Methods

Method Description
getRequest ( string $param = FALSE ) : mixed 获取本次请求中的参数,不区分大小

Private Methods

Method Description
isValid ( ) : boolean 判断此次请求是否为验证请求
validateSignature ( string $token ) : boolean 判断验证请求的签名信息是否正确

Method Details

__construct() public method

初始化,判断此次请求是否为验证请求,并以数组形式保存
public __construct ( string $token, boolean $debug = FALSE )
$token string 验证信息
$debug boolean 调试模式,默认为关闭

checkSignature() public method

public checkSignature ( )

getRequest() protected method

获取本次请求中的参数,不区分大小
protected getRequest ( string $param = FALSE ) : mixed
$param string 参数名,默认为无参
return mixed

run() public method

分析消息类型,并分发给对应的函数
public run ( ) : void
return void