Initial Release v1.0.0: Full feature set with Docker automation, Nginx/Alpine stack

This commit is contained in:
dyzulk
2026-01-16 11:21:32 +07:00
commit 45623973a8
139 changed files with 24302 additions and 0 deletions

31
app/Core/Autoloader.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace App\Core;
class Autoloader {
public static function register() {
spl_autoload_register(function ($class) {
// Convert namespace to full file path
// App\Core\Router -> app/Core/Router.php
// We assume ROOT is defined externally
if (!defined('ROOT')) {
return;
}
$prefix = 'App\\';
$base_dir = ROOT . '/app/';
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
return;
}
$relative_class = substr($class, $len);
$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
if (file_exists($file)) {
require_once $file;
}
});
}
}