you could do it in your bootstrap.



Steven Szymczak wrote:
> 
> Every one of my action controllers has an init() function that pulls a 
> config object from the registry and uses it to set some paths used 
> throughout the site (e.g.):
> 
> public function init() {
>       $view_cfg = Zend_Registry::get('SITE_CFG');
> 
>       $this->view->__set('pubImages', $view_cfg->dirs->images);
>       $this->view->__set('jsDir', $view_cfg->dirs->js);
>       $this->view->__set('cssDir', $view_cfg->dirs->css);
> }
> 
> How can factor out this functionality without resorting to a parent 
> class for all my action controllers?  I seem to recall a similar post to 
> the list, several months ago, that suggested utilizing a helper somehow...
> 
> Suggestions?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-factor-out-tasks-common-to-every-action-controller--tp20003502p20004290.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to