Having some issues with inheritance and calling the init function. My
controller classes inhert from:
AdminController extends SaSo_Controller_Action
and
SaSo_Controller_Action extends Zend_Controller_Action
I added the constructor in both classes (AdminController and
SaSo_Controller_Action):
public function __construct(Zend_Controller_Request_Abstract $request,
Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
{
parent::__construct($request, $response, $invokeArgs);
$this->init();
}
I assumed that init() in each class gets called. However, this haven't been
the case. So I tried to call the parent init function:
AdminController:
public function init()
{
parent::init();
$this->view = SaSo_Registry::get( 'view' );
$view->leftNavigation = 'admin';
$view->leftNavigationCap = ucfirst($view->leftNavigation);
$view->bodyContentImage = 'hed_admin.gif';
}
SaSo_Controller_Action:
public function init()
{
parent::init();
}
Here 2 questions:
-It doesn't seem that the view variables have been assigned. What could
be the reason?
-Would the init function be called twice if it's called in each
constructor and also in each init function?
Any insight would be appreciated!
TIA
Gunter