This question already has an answer here:
How do I autoload the class Google_Client
in Zend 2?
</div>
If your project uses Composer you can use it's classmap autoloader to spider any directory and add all the classes it finds to the autoloader:
If your project uses the built-in autoloader of Zend Framework (Zend\Loader
) check out it's documentation here. By default it does PSR-0 autoloading, but Zend\Loader
also supports classmap autoloading (docs here). For an example of using Zend\Loader
in a ZF2 module check out the Application module of ZendSkeletonApplication