restore and improve custom autoloader

autoload-rework
fadrian06 13 hours ago
parent 770d246e29
commit d58cbacda1

@ -0,0 +1,14 @@
<?php
declare(strict_types=1);
use flight\core\Loader;
require_once __DIR__ . '/Flight.php';
require_once __DIR__ . '/core/Loader.php';
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return require_once __DIR__ . '/../vendor/autoload.php';
}
Loader::autoload(true, dirname(__DIR__));

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php'; require_once __DIR__ . '/flight/autoload.php';
Flight::route('/', function () { Flight::route('/', function () {
echo 'hello world!'; echo 'hello world!';

Loading…
Cancel
Save