Abstract class, trait, & interface for events in PHP.
Needs methods for creating and triggering events.
Registering events should be done with a string for a name and a Callback. These should be added into a static array.
Triggering events should be done by first checking if $event exists in the static array, and then using call_user_func on all callbacks for that event, passing an array of given arguments given.
Abstract class, trait, & interface for events in PHP.
Needs methods for creating and triggering events.
Registering events should be done with a string for a name and a
Callback
. These should be added into a static array.Triggering events should be done by first checking if
$event
exists in the static array, and then usingcall_user_func
on all callbacks for that event, passing an array of given arguments given.