-- Waigani <[EMAIL PROTECTED]> wrote
(on Tuesday, 18 September 2007, 01:42 PM -0700):
> I've written a custom helper:
>
> class Hs_Action_Helper_Priv extends Zend_Controller_Action_Helper_Abstract{
>
> function Priv($priv){
> $AclCk = new Hs_Acl_Auth();
> return $AclCk->Priv($priv);
> }
>
> }
>
>
> Registered it in the bootstrap:
>
> Zend_Controller_Action_HelperBroker::addPrefix('Hs_Action_Helper');
>
>
> and called it in an action:
>
> $this->_helper->priv('hello');
>
>
>
> I get the error:
>
> Cannot redeclare IndexController::indexAction()
Action Helpers properly follow the Strategy pattern and have a single
method called when used as a pseudo-method: direct(). (View helpers
should likely do this, but they've been done using the method name ==
helper name paradigm since pre-0.1.0 and it's too late to change it
now.)
So, simply rename your 'Priv' method to 'direct', and you'll get the
functionality you're looking for.
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/