On Tuesday 16 June 2009 07:35:11 joedevon wrote: > 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.
You should note that "the plugin" is actually front controller plugin while "the helper" is the action controller helper. They have different scopes and purposes. -- Dado