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
Matthew Weier O'Phinney explains in this video that there are now 3 methods for autoloading :
A class-map generator utility is mentioned in the docs that will take care of writing the /vendor/vendor_name/library/autoload_classmap.php for you.
The solution you found is similar to the one Matthew mentions in the video for the Per-namespace/prefix autoloading. Following the code structure in ZendSkeletonApplication, that code would go in the /init_autoloader.php file, rather than in the /public/index.php file.