Re: [fw-general] How do I factor out tasks common to every action controller?

2008-10-16 Thread Matthew Weier O'Phinney
-- Steven Szymczak <[EMAIL PROTECTED]> wrote (on Wednesday, 15 October 2008, 11:09 PM +0100): > 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() {

Re: [fw-general] How do I factor out tasks common to every action controller?

2008-10-15 Thread Chris Martin
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'); > > $thi

Re: [fw-general] How do I factor out tasks common to every action controller?

2008-10-15 Thread Matthew Ratzloff
Out of curiosity, why the resistence to subclassing the action controller? -Matt On 10/15/08, Steven Szymczak <[EMAIL PROTECTED]> 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 s

Re: [fw-general] How do I factor out tasks common to every action controller?

2008-10-15 Thread Tim Nagel
Sorry my mistake, I need to learn how to read better ;) On Thu, Oct 16, 2008 at 12:04, Tim Nagel <[EMAIL PROTECTED]> wrote: > I created my own controller, derived from Zend_Controller_Action, calling > it Tim_Controller_Action and all of my controllers derive from my > controller. (putting it in

Re: [fw-general] How do I factor out tasks common to every action controller?

2008-10-15 Thread Tim Nagel
I created my own controller, derived from Zend_Controller_Action, calling it Tim_Controller_Action and all of my controllers derive from my controller. (putting it in Library/Tim/Controller/Action.php) Dont forget to call parent::init(); if you override the init in the real controllers. On Thu, O

Re: [fw-general] How do I factor out tasks common to every action controller?

2008-10-15 Thread gerardroche
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_Regi

[fw-general] How do I factor out tasks common to every action controller?

2008-10-15 Thread Steven Szymczak
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->