views:

20

answers:

1

I'm trying to figure out the best place to put xdebug's excellent xdebug_time_index() function so that I get the best indication of page execution times when using a Zend Framework application structure.

I was thinking of putting it in post dispatch hook in my controller (all my controllers inherit from a base controller class) but I've tried this and the results don't seem correct.

Any ideas?

A: 

I would place it in my index.php in the /public file, after calling $application->run();

Chris
That makes sense to me, the only problem I have there is I can't seem to then pass the results of xdebug_time_index() back to my layout/view so that I can output it on the bottom of the page.If I just echo it out, then it kills all my ajax functions.
Jujhar Singh
The problem is that if you see the request loop of a MVC ZF application, the layout/view is rendered before the last finish of the dispatch loop, so in order to inject it you need to put it in a Controller Plugin in the postDispatch() loop.
Chris