[ticket/12609] Add an interface for the event dispatcher

PHPBB3-12609