daniellucia / hooks
PHP Hooks System
Installs: 319
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
pkg:composer/daniellucia/hooks
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2025-12-21 12:20:04 UTC
README
PHP Hooks System
Installing
Install using Composer.
$ composer require daniellucia/hooks
Usage Action
$hooks = new daniellucia\Hooks\Manager; $hooks->action->add("header", function() { echo "Hello!"; }); $hooks->action->run("header");
Usage Filter
$hooks = new daniellucia\Hooks\Manager; $hooks->filter->add("header", function($value) { return $value . " World!"; }); echo $hooks->filter->apply("header", "Hello");