If your custom action controller extends Zend_Controller_Front you must
be careful that you are not overloading the static property
::$_instance, because the controller action helpers grab internally the
controller singleton from Zend_Controller_Front::getInstance() and if
you overload it Zend_Controller_Front::getInstance() will create a new
front controller instance instead of using the one you created.
I'm assuming that you are initiating your custom front controller in
your bootstrap with something like:
My_Controller_Front::getInstance();
When you do this, Zend_Controller_Front::$_instance should have your
custom front controller.
As for the action controllers, they must have the method
setFrontController(), are you sure your action controllers are extending
Zend_Action_Controller?
Regards,
Diego
Rolando Espinoza La Fuente wrote:
> Hi, I have a problem with my custom front controller (inherits zf front)
> and using the action helpers who use the front controller.
>
> The problem that i've found is that my custom controller does not
> pass through from action to helpers.
>
> Even action controller don't have a funcion setFrontController().
> My workaround was to inherit the action helper and hardcode
> the function getFrontController() to return my custom controller.
>
> Has anybody had this problem before?
>
> Regards,
>
>
没有评论:
发表评论