PHP Hooks System
Install using Composer.
$ composer require daniellucia/hooks
$hooks = new daniellucia\Hooks\Manager;
$hooks->action->add("header", function() {
echo "Hello!";
});
$hooks->action->run("header");
$hooks = new daniellucia\Hooks\Manager;
$hooks->filter->add("header", function($value) {
return $value . " World!";
});
echo $hooks->filter->apply("header", "Hello");