Got it.
Forgot to put in $this->_helper->Priv();
Thanks for the help :)
Waigani wrote:
>
> Okay I'm missing something.
>
> Everything is the same as in my first post except the method is now called
> 'direct'. I get the same error message:
>
> Cannot redeclare IndexController::indexAction()
>
>
> Matthew Weier O'Phinney-3 wrote:
>>
>> -- 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/
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Action-Helper-tf4477038s16154.html#a12766800
Sent from the Zend Framework mailing list archive at Nabble.com.