Search code examples
zend-frameworkpluginsfront-controller

Frontcontroller plugin does not load


When i use a frontcontroller plugin in zend frameworker it seems to run before the autoloader. How should i do this?

in my app.ini

resources.frontController.plugins.routes = "Plugin_Routes"

plugins/Routes.php

class Plugin_Routes extends Zend_Controller_Plugin_Abstract {
}

The error message..

Fatal error: Class 'Plugin_Routes' not found in /usr/share/php/Zend/Application/Resource/Frontcontroller.php on line 111

No include path at all?


Solution

  • I used to have :

    resources.frontController.plugins[] = "Dagho_Controller_Plugin_Auth"
    

    and its working for me very nice

    update : nothing to fancy just these lines below and doctrine autoloader

    protected function _initAutoload() {
            $autoloader = new Zend_Application_Module_Autoloader(array(
                        'namespace' => 'Default',
                        'basePath' => dirname(__FILE__),
                    ));
    
            return $autoloader;
        }