Search code examples
zend-frameworkfront-controller

A Controller plugin defined in application.ini not found by the front controller


I defined a plugin in application.ini directory like

resources.frontController.plugins.acl = "CMS_Controller_Plugin_Acl"

The namespace CMS_ is set to be autoloaded in bootstrap.php

    $autoLoader = Zend_Loader_Autoloader::getInstance();
    $autoLoader -> registerNamespace("CMS_");

But, when I lauch the program I am getting this error.

Class 'CMS_Controller_Plugin_Acl' not found in xxx\Zend\Application\Resource\Frontcontroller.php on line 117

Solution

  • Try to register your namespace in your application.ini before the plugin.

    autoloaderNamespaces.CMS = 'CMS'
    resources.frontController.plugins.acl = "CMS_Controller_Plugin_Acl"