gephart/event-manager

Gephart Event Manager Component

0.5 2017-10-02 15:37 UTC

This package is not auto-updated.

Last update: 2024-02-22 14:07:47 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