开发者

Zend framework ignores custom helper path in application.ini

I have my view helper in Library/My/View/Helper/LoadSkin.php, I added this line in application.ini : resources.view.helperPath.My_View_Helper = "My/View/Helper" but I'm still getting

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 
'Plugin by name 'LoadSkin' was not found in the registry; used paths: Zend_View_Helper_: Zend/View
/He开发者_如何学运维lper/;C:/Program Files (x86)/Zend/Apache2/htdocs/TinOuzel/application/views\helpers/' 

This looks like ZF stills looks for helper in default path ;/

My namespacje is registered in bootstrap:

protected function _initAutoloader ()
{
    $autoloader = Zend_Loader_Autoloader::getInstance();
    $autoloader->registerNamespace('My_');
    $autoloader->suppressNotFoundWarnings(true);
    return $autoloader;
}


in this case , you must had overridden the default view object

in much clear example , you are using something like :

$view = new Zend_View();

mostly somewhere in your bootstrap file , just remove it and you would be okay

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜