0

我有我的视图助手Library/My/View/Helper/LoadSkin.php,我在 application.ini 中添加了这一行:resources.view.helperPath.My_View_Helper = "My/View/Helper"但我仍然得到

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
/Helper/;C:/Program Files (x86)/Zend/Apache2/htdocs/TinOuzel/application/views\helpers/' 

这看起来像 ZF Stills 在默认路径中寻找助手;/

我的namespacje在引导程序中注册:

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

1 回答 1

3

在这种情况下,您必须覆盖了默认视图对象。

在非常清楚的例子中,您正在使用类似的东西:

$view = new Zend_View();

主要是在你的引导文件中的某个地方,只要删除它就可以了

于 2010-12-24T04:37:25.557 回答