title: Class Loading in Phalcon for plugins
body: <p>When adding a dispacher in the services.php it doesnt seem to have access to the autoloader to include class's.</p>
  
  <p>Example: /config/services.php</p>
  
  <pre><code>$di-&gt;set('dispatcher', function() use ($di) {
  
     require __DIR__.'/../../app/plugins/security.php';
  
     $eventsManager = $di-&gt;getShared('eventsManager');
  
     $security = new Security($di);
  
     $eventsManager-&gt;attach('dispatch', $security);
  
     $dispatcher = new Phalcon\Mvc\Dispatcher();
     $dispatcher-&gt;setEventsManager($eventsManager);
  
     return $dispatcher;
  });
  </code></pre>
  
  <p>Is it correct to include the require? Its the only way I can seem to have access to the security plugin? Im sure there is a better way?</p>
  
  <p>Both <a href="https://github.com/phalcon/invo" rel="nofollow">https://github.com/phalcon/invo</a> is different to the demonstration on the Phalcon homepage?</p>
  
  <p>Anyone clarify?</p>