Hello,
First of all, Zend_Controller_Action_HelperBroker::addPath() is wrapper
for Zend_Loader_PluginLoader::addPrefixPath(). Path is not relative neither
to the application directory nor file where do you calling that method.
So in your case that call should looks like:
Zend_Controller_Action_HelperBroker::addPath('controllers/helpers',
'Action_Helper');
And `controllers/helpers` should be in the include_path environment
variable.
Second. Read manual carefully. In your case, file
/application/controllers/helpers/Acl.php should contain Controller_Helper_Acl
class according to the manual you have showed.
Can you show your Bootstrap.php file?
2010/2/10 Steve Rayner <[email protected]>:
> I found this in the reference guide;
>
>
>
> controllers/helpers/: These directories will contain action helpers. Action
> helpers will be namespaced either as "Controller_Helper_" for the default
> module or "<Module>_Controller_Helper" in other modules.
>
>
>
> So I have put my action helper here;
>
>
>
> /application/controllers/helpers/Acl.php
>
>
>
> My class is called;
>
>
>
> Places_Controller_Helper_Acl
>
>
>
> And I have registered the namespace in the bootstrap;
>
>
>
> $autoloader = new Zend_Application_Module_Autoloader(array(
>
> 'namespace' => 'Places_',
>
> 'basePath' => dirname(__FILE__),
>
> ));
>
>
>
> However, I still get the same error ‘class Places_Controller_Helper_Acl not
> found.
>
> Do you know of an example that shows how to implement action controllers on
> version 1.10?
>
>
>
> Steve Rayner
>
>
>
> From:
> fw-general-return-33728-srayner=williams-refrigeration.co...@lists.zend.com
> [mailto:fw-general-return-33728-srayner=williams-refrigeration.co...@lists.zend.com]
> On Behalf Of Mon Zafra
> Sent: 09 February 2010 22:05
> To: [email protected]
> Subject: Re: [fw-general] Controller Action Helpers
>
>
>
> Paths are always relative to the public directory (with a few exceptions).
> When in doubt, prepend APPLICATION_PATH.
>
> -- Mon
>
> On Wed, Feb 10, 2010 at 4:18 AM, Steve Rayner
> <[email protected]> wrote:
>
> Can anyone help me with where to put my controller action helpers.
>
>
>
> I have this in my bootstrap;
>
>
>
> Zend_Controller_Action_HelperBroker::addPath('./controllers/helpers' ,
> 'Action_Helper');
>
>
>
> My class lives in a file called;
>
>
>
> \application\controllers\helpers\AccessControl.php
>
>
>
> My class name is; Action_Helper_AccessControl
>
>
>
> The action helper does not seem to get loaded. Where an I going wrong?
>
> Is there a standard convention as to where action controllers should live?
>
>
>
> Steve Rayner
>
>
>
> Williams Refrigeration is a trading name of AFE Group Limited.
> Registered in England & Wales under Registered Number 3872673. Registered
> Office Address - Bryggen Road, North Lynn, Industrial Estate, Kings Lynn,
> Norfolk, PE30 2HZ
>
> Williams Refrigeration does filter email attachments for spam and viruses
> and malicious content with Sophos Endpoint Security. While every care has
> been made to ensure this message is secure we advise that you perform your
> own checks as well on inbound messages.
>
> This e-mail and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error or are having trouble sending email
> to Williams please notify the system administrator -
> [email protected]
>
> Any views or opinions expressed in this e-mail are those of the sender and
> do not necessarily coincide with those of Williams Refrigeration or the AFE
> Group.
>
>
>
> Williams Refrigeration is a trading name of AFE Group Limited.
> Registered in England & Wales under Registered Number 3872673. Registered
> Office Address - Bryggen Road, North Lynn, Industrial Estate, Kings Lynn,
> Norfolk, PE30 2HZ
>
> Williams Refrigeration does filter email attachments for spam and viruses
> and malicious content with Sophos Endpoint Security. While every care has
> been made to ensure this message is secure we advise that you perform your
> own checks as well on inbound messages.
>
> This e-mail and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error or are having trouble sending email
> to Williams please notify the system administrator -
> [email protected]
>
> Any views or opinions expressed in this e-mail are those of the sender and
> do not necessarily coincide with those of Williams Refrigeration or the AFE
> Group.
--
Sincerely yours,
Aleksey V. Zapparov A.K.A. ixti
FSF Member #7118
Mobile Phone: +34 617 179 344
Homepage: http://www.ixti.ru
JID: [email protected]
*Origin: Happy Hacking!