执行函数工具

执行函数工具,和钩子函数有相同的作用。暂时用于支付回调时调用不同的方法来使用;不建议大量使用,可用event来代替。

内置方法

执行挂载方法

public function listen(string $hookName, ...$arguments)

使用方法

use crmeb\utils\Hook;

use app\services\pay\PayNotifyServices;

$parmes = [];
new Hook(PayNotifyServices::class,'wechat')->listen('success', $parmes);
本页目录