-- asagala <[email protected]> wrote
(on Sunday, 25 October 2009, 11:02 AM -0700):
> 
> Tried that. It doesnt work.

Is App/library on your include_path?

If it is, and things still aren't working, then you need to send me the
exact code to reproduce it. I just tried the following:

    App/
        Bootstrap.php
        library/
            Helper/
                DateTimezone.php
        configs/
            application.ini
        controllers/
            IndexController.php
        views/
            scripts/
                index.phtml
    public/
        .htaccess
        index.php

In index.php, I define APPLICATION_PATH to point to the 'App' directory
(question: why are you using 'App' and not 'application'?). My
App/configs/application.ini file adds these directives:

    includePaths.library   = APPLICATION_PATH "/library"
    autoloaderNamespaces[] = "Helper_"
    resources.frontcontroller.actionhelperpaths.Helper = APPLICATION_PATH 
"/library/Helper"

In App/library/Helper/DateTimezone.php, I have the following class:

    class Helper_DateTimezone extends Zend_Controller_Action_Helper_Abstract
    {
    }

I can then grab the helper in my controller:

    class IndexController extends Zend_Controller_Action
    {
        public function indexAction()
        {
            $helper = $this->_helper->getHelper('DateTimezone');
        }
    }

Please make sure that you are following the above directions.

> weierophinney wrote:
> > 
> > -- asagala <[email protected]> wrote
> > (on Sunday, 25 October 2009, 09:45 AM -0700):
> >> 
> >> Added autoloaderNamespaces[] = "Helper_" to my application.ini file but
> >> still
> >> no success. I still get that the Action Helper is not found
> >> 
> >> 
> >> 
> >> weierophinney wrote:
> >> > 
> >> > -- asagala <[email protected]> wrote
> >> > (on Sunday, 25 October 2009, 06:32 AM -0700):
> >> > > Cant seem to get my Action Helpers to be discovered by Zend. I have
> >> read
> >> > > a
> >> > > couple of articles but still cant seem to get them to work.
> >> > > 
> >> > > i have this line in the Bootstrap.php
> >> > > 
> >> > > Zend_Controller_Action_HelperBroker::addPrefix('Helper');
> >> > > 
> >> > > My file structure is like this
> >> > > App\
> >> > >  --library\
> >> > >  ----Helper\ 
> >> > >    ------Helper_DateTimezone.php
> > 
> > Here's the other problem. Just call the file "DateTimezone.php", but
> > inside it, have it define the class "Helper_DateTimezone".
> > 
> > 
> >> > > Class definition is like this
> >> > > class Helper_DateTimezone extends
> >> Zend_Controller_Action_Helper_Abstract
> >> > > 
> >> > > Also checked that the library folder was in my path with this
> >> function
> >> > > get_include_path(); 
> >> > 
> >> > You need to inform the autoloader about the "Helper_" namespace. Since
> >> > you're clearly using Zend_Application, you can do this in your
> >> > configuration file. Add the following:
> >> > 
> >> >    autoloaderNamespaces[] = "Helper_"
> >> > 
> >> > or, if using an XML configuration:
> >> > 
> >> >     <autoloaderNamespaces> Helper_</autoloaderNamespaces>
> >> > 
> >> > -- 
> >> > Matthew Weier O'Phinney
> >> > Project Lead            | [email protected]
> >> > Zend Framework          | http://framework.zend.com/
> >> > 
> >> > 
> >> 
> >> -- 
> >> View this message in context:
> >> http://www.nabble.com/Action-Helpers-not-found-tp26047888p26049606.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >> 
> > 
> > -- 
> > Matthew Weier O'Phinney
> > Project Lead            | [email protected]
> > Zend Framework          | http://framework.zend.com/
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Action-Helpers-not-found-tp26047888p26050238.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to