title: Autoload custom library in Zend Framework 2.0
body: <p>I need to use autoloading for my custom classes in Zend Framework <strong>2.0</strong>. My custom library located in <code>/vendor/Garvey/library/Garvey</code>. I have a simple extended AbstractTable class in <code>/vendor/Garvey/library/Garvey/Db/Table/AbstractTable.php</code>:</p>
  
  <pre><code>&lt;?php
  
  namespace Garvey\Db\Table;
  
  use Zend\Db\Table\AbstractTable;
  
  abstract class AbstractTable extends AbstractTable
  {
      public function getItemById($id)
      {
  
      }
  }
  </code></pre>
  
  <p>In the index.php I have the following code:</p>
  
  <pre><code>require_once 'vendor/ZendFramework/library/Zend/Loader/AutoloaderFactory.php';
  Zend\Loader\AutoloaderFactory::factory(array('Zend\Loader\StandardAutoloader' =&gt; array(
      'prefixes' =&gt; array(
          'Garvey' =&gt; 'vendor/Garvey/library/Garvey',
      )
  )));
  </code></pre>
  
  <p>But I have the following error. What I have missed?</p>
  
  <pre><code>Fatal error: Class 'Garvey\Db\Table\AbstractTable' not found
  </code></pre>
  
  <p>Thank you in advance.</p>