I need to use autoloading for my custom classes in Zend Framework 2.0. My custom library located in /vendor/Garvey/library/Garvey. I have a sim
/vendor/Garvey/library/Garvey
Your original index.php would also worked if you changed the 'prefixes' key to 'namespaces' and specify path like below:
Zend\Loader\AutoloaderFactory::factory(array('Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( 'Garvey' => dirname(__DIR__) . '/vendor/Garvey', ) )));