The following question on Stack Overflow prompted this post:

http://stackoverflow.com/questions/866367/how-do-i-centralize-code-from-my-init-functions-in-all-controllers/866517

"How do I centralize code from my init functions in all controllers?"

Three answers all work I believe:

1. Extend Zend_Controller_Action and have your controllers extend from THERE

2. Write a plugin by extending Zend_Controller_Plugin_Abstract

3. Create an Action Helper

I assume there are situations where each one of those is the best solution.
I've been doing answer 1 mostly, but thinking about switching to answer 3
for future projects. 

But I'd like to know what the recommended situations are for each solution.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Of-3-methods-to-centralize-code-used-in-all-many-controllers-which-do-you-use-when--tp24047991p24047991.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to