Adding action helper path in Zend Framework 1.11 for namespaced (5.3) classes

Does anyone know how to tell Zend Framework 1.11 how to find my namespaced action helper classes? I'm using proper PHP5.3 Namespaces so not the normal My_Helper etc.

I would love to do this without using an ini file also as I'm not using Zend_Application and don't really want to refactor all my set up.

I can register the view helper path fine with an ini file but cant get action helpers to work.

Working view helper ini config:

resources.view.helperPath.Foo\View\Helper\ = APPLICATION_PATH "/../library/Foo/View/Helper/"

Non-working action helper ini config:

resources.frontController.actionhelperpaths.Foo\Helper\ = APPLICATION_PATH "/../library/Foo/Helper/"

Cant seem to find any information about it?

If you know how to do it without using Ini files that would be awesome too :)

Answers


AFAIK, although ZF1 autoloader can handle genuine PHP namespaces, neither the plugin loader used for view helpers nor the standard resource autoloader (typically used for models, forms, etc) can deal with genuine PHP-5.3 namespace path/prefix mappings (see here).

It is probably necessary to:

  • write your own plugin loader and feed it to the view during bootstrap
  • write your own resource autoloader and invoke it in application/model bootstraps.

Bummer. Hope I am wrong.

ZF2 - still in late beta as the time of this writing - is fully capable to dealing with true PHP namespaces.


Need Your Help

Invoke ObjectARX acedDisableDefaultARXExceptionHandler from c#

c# autocad autocad-plugin objectarx

I'm developing an AutoCAD Plugin, and I can't capture unhandled exceptions.

How to upload a file using af:inputFile in Oracle ADF

java file-upload oracle-adf jdeveloper

Can anyone please tell me how to upload file to server using af:inputFile in Oracel ADF. I searched about this and found we can use the following