\CLASS_PLUGIN

Summary

Methods
Properties
Constants
__construct()
register()
trigger()
$opts
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$listeners
N/A

Properties

$opts

$opts : 

Type

$listeners

$listeners : 

Type

Methods

__construct()

__construct() : void

构造函数

register()

register(string  $hook, object  $reference, string  $method) 

注册需要监听的插件方法(钩子)

Parameters

string $hook
object $reference
string $method

trigger()

trigger(string  $hook, mixed  $data = '') : mixed

触发一个钩子

Parameters

string $hook

钩子的名称

mixed $data

钩子的入参

Returns

mixed