gephart / event-manager
Gephart Event Manager Component
0.5.1
2022-06-25 12:09 UTC
Requires
- php: >=7.1
Requires (Dev)
- phpmd/phpmd: @stable
- phpstan/phpstan: ^1.7.15
- phpunit/phpunit: 9.5.21
- squizlabs/php_codesniffer: ^3.7.1
README
Dependencies
- PHP >= 7.1
Instalation
composer require gephart/event-manager
Using
Basic using:
$listener1 = function () { echo "Hello"; }; $listener2 = function () { echo "World"; }; $event_manager->attach("my.event", $listener1, 200); $event_manager->attach("my.event", $listener2, 100); $event_manager->trigger("my.event"); // HelloWorld