zendframework/ZendDeveloperTools — pull request #30 by coss (2012-09-07 20:23:50+00:00)
Title: [WIP] Finishing the planned functionality.

The clean up PRs were a step in the right direction, but because ZF2 is now
stable, I will continue with a more aggressive clean up.

Changes:
- The profiler and related parts are now located under the Profiler namespace.
- Its uses the event manager to decouple functionality like the collecting
process from the profiler.
- New profiler events: `bootstrap`, `collect`, `access`, `finish`
- The `bootstrap` event allows modules to do thing only if the profiler is
enabled. The matcher will listen to this event, with a higher priority, and
stops further propagation if the defined pattern does not match.
- The `collect` event is used to start the collecting process. It will also
be used flush the reponse early, if possible.
- The `access` event only occurs if any profiled data should be send or was
requested from the browser, like the toolbar. It will be triggered in the
`GuardListener` or during the controller dispatch (see ZendDeveloperTools
`AbstractActionController`). If the access was denied (
`ProfilerEvent::denyAccess`), the rendering will be interrupted or in the
controller case, it will return a 404 response. This is done to prevent
the module from exposing itself thru the internet.
- The `finish` event is used to send the toolbar/FirePHP console output or
save the collected data.
- The toolbar will support ajax based application, which is currently not the
case, but the initial toolbar loading will still happen without JavaScript.
- Simplified the `CollectorInterface`. A collector can now implement additional
features such as `ToolbarTemplateProviderInterface` (ugly name, I know. Maybe shortened to TemplateProviderInterface).