Zend framework 类别';应用程序插件检查验证';在Zend Framework的bootstrap.php中找不到
我在zend framework中创建了一个插件,并在bootstrap.php中注册了这个插件。但是我的页面显示了错误 在bootstrap.php文件中找不到类“Application\u Plugin\u CheckAuthentication” 我的插件注册码如下:Zend framework 类别';应用程序插件检查验证';在Zend Framework的bootstrap.php中找不到,zend-framework,plugins,Zend Framework,Plugins,我在zend framework中创建了一个插件,并在bootstrap.php中注册了这个插件。但是我的页面显示了错误 在bootstrap.php文件中找不到类“Application\u Plugin\u CheckAuthentication” 我的插件注册码如下: function _initViewHelpers() { $frontController = Zend_Controller_Front::getInstance(); $frontController->
function _initViewHelpers() {
$frontController = Zend_Controller_Front::getInstance();
$frontController->registerPlugin(new Application_Plugin_CheckAuthentication());
}
我认为这不是采取插件文件夹。有人能帮忙吗
谢谢。实际文件在哪里 如果文件位于
/application/plugins
或/application/modules/mymodule/plugins
中,则自动加载程序应找到并自动加载该文件,因为/plugins
是插件的一个名称
如果文件位于任何其他位置,则需要注册路径:
//in the application.ini
pluginPaths.Application_Plugin = APPLICATION_PATH "/../library/Application/Plugin"
//in the bootstrap, or anywhere else really.
//there may be other syntax available...
$loader = new Zend_Loader_PluginLoader();
$loader->addPrefixPath($prefix, $path);
一旦自动加载程序知道在哪里查找,一切都应该工作。确保自动加载命名空间
应用程序。同时仔细检查类和文件的大小写。