gephart/event-manager

Gephart Event Manager Component

0.5.1 2022-06-25 12:09 UTC

This package is auto-updated.

Last update: 2024-06-12 13:06:53 UTC


README

php

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