Autoloader

How to use composer autoloader

# Use Cases
use psr4
autoload a class file or a directory of classes


# Solutions

# Manually
$loader = require YOUR_VENDOR_PATH'/autoload.php';

$loader->addPsr4('projectName\\ClassDir\\', "path/to/classes/");
// inside classe folder there are classes with namespace projectName/ClassDir;


$classmap = array(
    "ClassName" => "path/to/classes/ClassName.php",