шаг 1 сделан

This commit is contained in:
Alisa
2026-06-03 23:12:10 +03:00
parent 891315780f
commit 6d7ef09c5b
21 changed files with 658 additions and 34 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
spl_autoload_register(static function (string $class): void {
$prefix = 'App\\';
if (!str_starts_with($class, $prefix)) {
return;
}
$relativeClass = substr($class, strlen($prefix));
$path = __DIR__ . '/' . str_replace('\\', '/', $relativeClass) . '.php';
if (is_file($path)) {
require_once $path;
}
});
require_once __DIR__ . '/helpers.php';
App\Core\Env::load(dirname(__DIR__) . '/.env');