beberlei wrote:
> 
> I would extend Zend_Controller_Action and make an application wide
> action controller that has the init function which centralizes all the 
> duplicated code.
> 

But I thought the purpose of using an action helper was to avoid exactly
this, as has been stated earlier in this thread? Extending the
Zend_Controller_Action is the easiest way to achieve this goal, but articles
such as 
http://devzone.zend.com/article/3350-Action-Helpers-in-Zend-Framework
http://devzone.zend.com/article/3350-Action-Helpers-in-Zend-Framework  state
this is not the appropriate approach.

Basically I'm under the impression I can call this action helper statically
within the bootstrap.php file, like so:

$initStuff =
Zend_Controller_Action_HelperBroker::getStaticHelper('InitializeStuff');

>From there, it seems there should be some way to make certain variables
available in each controller's $this scope, perhaps using a callback within
the action helper. However this is the part of the puzzle that continues to
escape me.

Thank you!
Jason
-- 
View this message in context: 
http://www.nabble.com/Best-Practices%3A-Eliminate-redundancy-within-various-controller-init-methods--tp21341232p21632899.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to