简体   繁体   中英

Zend framework: Implementing Zend_acl

I am trying to implement zend_acl . I created a custom plugin and placed it in

myzend/library/My/Controller/Plugin/Acl.php

Where myzend is directory of my project. I am trying to initialize this custom plugin from application.ini using

autoloaderNamespaces[] = "My_"
resources.frontController.plugins.acl = "My_Controller_Plugin_Acl"

I am getting error message:

Fatal error: Class 'My_Controller_Plugin_Acl' not found in E:\\wamp\\www\\myZend\\library\\Zend\\Application\\Resource\\Frontcontroller.php on line 117

Any suggestions?

did you register the plugin in your bootstrap ?

Add this to your bootstap.php file

protected function _initAcl() {
        $frontController = Zend_Controller_Front::getInstance();
        $frontController->registerPlugin(new My_Controller_Plugin_Acl());
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM