peterhorne/Elmer — Issue #1: Plugins needs a hooks system
Author: peterhorne
Created: 2012-01-15 12:25:04+00:00
State: open

Add a method to \Framework\Plugins called ::trigger($hook_name), or something similar. When called it loops over all the initialised plugins looking for any that have the method $hook_name and calling it if there is a match.

Additional args could be passed to the hook by using func_get_args and user_call_func_array.

There should be some support for return values and/or callback functions when calling \Framework\Plugins::trigger()