I've got a problem using an empty Zend_View and addHelperPath. Someone knows where is the difference between
$view = Zend_Layout::getMvcInstance()->getView();
$view->addHelperPath(
APPLICATION_PATH . '/views/helpers/layouts',
'FOO_View_Helper'
);
and
$view = new Zend_View;
$view->addHelperPath(
APPLICATION_PATH . '/views/helpers/layouts',
'FOO_View_Helper'
);
Zend_Layout::getMvcInstance()->setView($view);
$helper = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$helper->setView($view);
With example number one, my view helper got loaded. Example number two said
Plugin by name 'PriceOutput' was not found in the registry; used paths:
Zend_View_Helper_: Zend/View/Helper/;./views\helpers/
I've added an
echo "<xmp>", var_dump($registry), "</xmp>";
in
PluginLoader::load($name, $throwExceptions = true)
and the helperPaths are all at the same place. But with example Number two, ZF seems to search only in Zend_View_Helper
and not in FOO_View_Helper
.
Any ideas?
Like I told, the first example took a look at FOO_View_Helper, the 2nd not:
Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'FooBar' was not found in the registry; used paths: FOO_View_Helper_: C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/basket/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/globallayer/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/globallayer/help/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/globallayer/styleinfolayer/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/layout/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/nys/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/overview/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/search/;C:\Programme\Zend\Apache2\htdocs\trunk_webshop\application/views/helpers/singleproductview/;C:\Programme\Zend in C:\Programme\Zend\Apache2\htdocs\trunk_core_webshop\library\Zend\Loader\PluginLoader.php on line 414
($view->getHelperPaths() should be better :P )