phpbb/phpbb3 — pull request #529 by igorw (2012-01-08 00:09:27+00:00)
Title: [WIP][PHPBB3-9550] Event dispatcher (hooks)

This is a proof of implementation of hooks using a backported version of the Symfony2 event dispatcher, which has been adjusted for phpBB naming conventions.

Here is an example hook:

'page_header'
);
}
}

My plan for 3.2 is to require PHP 5.3 and start using third party libs, including some Symfony2 components. So it makes sense to use something similar, so that when the time comes, everyone will already be familiar with it.

Points of this PR that still need to be addressed:

* modifying data, perhaps pass by reference
* potentially caching which extensions subscribe to which events and only include the subscriber when that event is dispatched
* how to integrate this with template hooks

I just threw this together today. I think it's an approach that could work for us. Feedback please.

Ticket: http://tracker.phpbb.com/browse/PHPBB3-9550
RFC: http://area51.phpbb.com/phpBB/viewtopic.php?f=84&t=32805