kel/hooks
Composer 安装命令:
composer require kel/hooks
包简介
A simple php framework for adding runtime hooks to a system.
README 文档
README
A simple php framework for adding runtime hooks to a system.
installation
$ composer require kel/hooks
example
use Kel\Load; use Kel\Hooks; //create a new Hooks instance //passing an array of config options is optional //__NB: Multiple hooks can be added to the same hook point__ $hook = new Hooks(Load::config(__DIR__.'/config.php')); //add a hook init.php to the hook point init //the hook point is created if it does not exist $hook->add_hook('init', "init.php"); //add a hook init.php to the hook point final $hook->add_hook('final', "init.php"); //run the hook init $hook->run_hook('init'); //run the hook final $hook->run_hook('final');
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-31