title: Zend Framework - Zend_Loader_PluginLoader
body: <p>I'm just really starting with the Zend Framework, and currently I'm having a problem with the Zend_Loader_PluginLoader.</p>
  
  <p>I managed to get a module specific plugin working easily enough using the following code:</p>
  
  <pre><code>class Api_Bootstrap extends Zend_Application_Module_Bootstrap
  {
      protected function _initPlugins()
      {
          $loader = new Zend_Loader_PluginLoader(array(
              'Api_Plugin' =&gt; 'application/modules/api/plugins',
          ));
  
          $front = Zend_Controller_Front::getInstance();
          $front-&gt;registerPlugin(new Api_Plugin_ErrorControllerSelectorPlugin());
      }
  }
  </code></pre>
  
  <p>Edit: The class file is located at <code>application/modules/api/plugins/ErrorControllerSelectorPlugin.php</code></p>
  
  <p>I then tried to adapt this to get a plugin loaded for the whole application using:</p>
  
  <pre><code>class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  {
      protected function _initAppAutoload()
      {
          $autoloader = new Zend_Application_Module_Autoloader(array(
              'namespace' =&gt; 'App',
              'basePath' =&gt; dirname(__FILE__),
          ));
  
          return $autoloader;
      }
  
      protected function _initPlugins()
      {
          $loader = new Zend_Loader_PluginLoader(array(
              'My_Plugin' =&gt; 'application/plugins',
          ));
  
          $front = Zend_Controller_Front::getInstance();
          $front-&gt;registerPlugin(new My_Plugin_ModuleConfigLoaderPlugin());
      }
  }
  </code></pre>
  
  <p>But I'm getting errors:</p>
  
  <pre><code>Fatal error: Class 'My_Plugin_ModuleConfigLoaderPlugin' not found in /var/www/localhost/application/Bootstrap.php on line 22
  </code></pre>
  
  <p>Edit: The class file is located at <code>application/plugins/ModuleConfigLoaderPlugin.php</code></p>
  
  <p>So - since the files are where I would expect them to be as far as the prefix/path pairs sent to Zend_Loader_PluginLoader() and the code in both cases are the same, what's the difference? </p>
  
  <p>How do I get it to recognise my application-level plugins?</p>