shgysk8zer0 / core_api

The foundation of Core. Only traits, interfaces, & abstracts
GNU General Public License v3.0
0 stars 1 forks source link

Need event system #10

Closed shgysk8zer0 closed 9 years ago

shgysk8zer0 commented 9 years ago

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.