PHP Class PFinal\Wechat\Kernel

ファイルを表示 Open project: pfinal/wechat Class Usage Examples

Protected Properties

Property Type Description
$api Api
$dispatcher Symfony\Component\EventDispatcher\EventDispatcher
$redpackHelper PFinal\Wechat\SDK\Redpack\Helper

Public Methods

Method Description
getApi ( ) : Api
getConfig ( $name, $defaultValue = null )
getDispatcher ( ) : EventDispatcher
getRedpackHelper ( ) : Helper
handle ( ) : string
init ( $config )
register ( string $type, callback $callback, integer $priority )

Method Details

getApi() public static method

public static getApi ( ) : Api
return Api

getConfig() public static method

public static getConfig ( $name, $defaultValue = null )

getDispatcher() public static method

public static getDispatcher ( ) : EventDispatcher
return Symfony\Component\EventDispatcher\EventDispatcher

getRedpackHelper() public static method

public static getRedpackHelper ( ) : Helper
return PFinal\Wechat\SDK\Redpack\Helper

handle() public static method

public static handle ( ) : string
return string

init() public static method

public static init ( $config )

register() public static method

public static register ( string $type, callback $callback, integer $priority )
$type string 微信事件类型,对应 Message::TYPE_XXX 常量
$callback callback 处理函数,此函数接收一个WechatEvent对象
$priority integer 值大者优先级高

Property Details

$api protected_oe static_oe property

protected static Api,PFinal\Wechat $api
return Api

$dispatcher protected_oe static_oe property

protected static EventDispatcher,Symfony\Component\EventDispatcher $dispatcher
return Symfony\Component\EventDispatcher\EventDispatcher

$redpackHelper protected_oe static_oe property

protected static Helper,PFinal\Wechat\SDK\Redpack $redpackHelper
return PFinal\Wechat\SDK\Redpack\Helper