skopek / hooks
PHP Hooks System
v0.2.1
2016-06-05 12:00 UTC
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2025-04-19 01:35:30 UTC
README
PHP Hooks System
Installing
Install using Composer.
$ composer require skopek/hooks
Usage Action
$hooks = new Skopek\Hooks\Manager; $hooks->action->add("header", function() { echo "Hello!"; }); $hooks->action->run("header");
Usage Filter
$hooks = new Skopek\Hooks\Manager; $hooks->filter->add("header", function($value) { return $value . " World!"; }); echo $hooks->filter->apply("header", "Hello");