Hi All,
Please excuse my ignorance here.
I have several Controllers that all do various things. However there
are common things I wish them all to do. Mostly just set up vars for
ease of use. Eample
protected $_myRegistry = null;
protected $_myDebug = false;
public function init()
{
$this->_myRegistry = $this->_registry = Zend_Registry::getInstance();
%this->_myDebug = $this->_myRegistry->get('debug');
}
I am trying to apply the principle of DRY here, because as the
application grows, I am repeating myself more and more.
I created an action plugin thinking I was on the right track, however
I discovered I was not. Basically, I want all this stuff setup before
my controller is called, but have it available to my controller in a
manner similar to $this->_myRegistry. Or would I best be doing this in
an action helper?
Does anyone have any pointers to me about how I would accomplish this,
if its possible.
Thanks in advance
AJ