| Start |
|---|
| Autoloading For libraries that specify autoload information, Composer generates a vendor/autoload.php file. You can simply include this file and you will get autoloading for free. This makes it really easy to use third party code. For example: If your project depends on Monolog, you can just start using classes from it, and they will be autoloaded. You can even add your own code to the autoloader by adding an Composer will register a PSR-4 autoloader for the Acme namespace. You define a mapping from namespaces to directories. The After adding the autoload field, you have to re-run Including that file will also return the autoloader instance, so you can store the return value of the include call in a variable and add more namespaces. This can be useful for autoloading classes in a test suite, for example. In addition to PSR-4 autoloading, Composer also supports PSR-0, classmap and files autoloading. |
Read Article
https://develop.horje.com/learn/1434/reference