开发者

Zend Framework - call something at the end of building a page

Hi I would like to call a method at the end of a page generation using Zend Framework. How to do this?

I am using Doctrine2 + ZF. The EntityManager has a flush method, which should in the common cases only be called at the end of the page generation. Is there a hook or开发者_Go百科 a destructor emulation in Zend Framework? 2


Use a controller plugin. I assume the dispatchLoopShutdown is what you need.


Why just don't use your own function?

call register_shutdown_function(); and the passed function will be executed at the end of the script

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜