I'm having trouble using Zend_View::addHelper to add additional helper
paths.  I have a project that lives in /home/ewest/project .  The standard
Zend_View_Helper classes live under
/home/ewest/project/library/Zend/View/Helper.  /home/ewest/project/library
is also part of my PHP include path.  My own helper classes reside under
/home/ewest/project/application/views/helpers.  There, I have my own Url
helper class that should override the standard Zend_View_Helper_Url-- my
version takes a string argument instead of an array.

In my base action class's initView method, I call:
$this->view->addHelperPath('/home/ewest/project/library/Zend/View/Helper',
'');
$this->view->addHelperPath('/home/ewest/project/application/views/helpers',
'');

However, I get errors like this on my test page:
Error number: 2 Error string:
fopen(/home/ewest/project/application/views/helpers/Doctype.php) [
function.fopen <http://fedora/feedinvader/index/function.fopen>]: failed to
open stream: No such file or directory Error file:
/home/ewest/project/library/Zend/Loader.php Error line: 160

If I remove the second call to addHelper, then I end up with the error:
*Catchable fatal error*: Argument 1 passed to Zend_View_Helper_Url::url()
must be an array, string given

It seems that only one path is being used at a time instead of both.  I've
checked the documentation-- does anyone have any idea what's going wrong?

-Ed

Reply via email to