phpbb/phpbb3 — pull request #981 by imkingdavid (2012-08-31 00:17:03+00:00)
Title: [feature/controller] Decouple front controller implementation from extensions

As per the IRC log from #phpbb-dev from 5/22/12 starting at 11:16 US Eastern time (or just see my comment in the ticket), the idea is to allow extensions have multiple controllers and to not restrict controllers to only working with extensions.

The current requirements for a class being recognized as a controller are:
- For extensions, a file located in the ext///controllers/ directory containing a class of the same name that extends phpbb_controller_base.
- For the core, a file in the /includes/ directory suffixed with _controller containing a class that extends phpbb_controller_base.

phpbb_controller_base implements the phpbb_controller_interface, which requires at least two methods:
- `handle()` - This is the "main" method of the controller that actually serves the page.
- `get_access_name()` - This is a method that simply returns a string that is the access_name for the extension. The access name is simply the name you use in the URL to access that controller.

phpbb_controller_base is also responsible for making the core variables ($auth, $config, et al) available to controllers so that each controller does not have to globalize those variables themselves. They are available as class properties.

This has been tested with a core controller and an extension controller, and both work as expected.

http://tracker.phpbb.com/browse/PHPBB3-10864