EventHandler
in
Table of Contents
- handleEvent() : EventContext
- Called when an event is published that is handled by this class.
Methods
handleEvent()
Called when an event is published that is handled by this class.
public
static handleEvent(Game $g, EventContext $context) : EventContext
Parameters
- $g : Game
-
The game.
- $context : EventContext
-
Arbitrary dictionary representing context around this event.
Return values
EventContext —Return an array if you want to make changes to the $context before the next handler is called. Otherwise, return null. Any changes made will be propogated to the event publisher as well.