skopek / hooks
PHP Hooks System
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 2
Open Issues: 2
pkg:composer/skopek/hooks
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2025-10-04 03:55:33 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");