bootstrap.php 401 Bytes
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php

require_once __DIR__ . '/../lib/common/customFunctions.php';

spl_autoload_register(function (string $class) {
    $path      = explode('\\', $class);
    $className = array_pop($path);
    array_shift($path);
    $path = strtolower(implode('/', $path));
    $path = __DIR__ . '/../lib/' . $path . '/' . $className . '.php';

    if (file_exists($path)) {
        require_once $path;
    }
});