Initial Kaffeekasse SaaS restart

This commit is contained in:
2026-06-15 17:13:38 +02:00
commit b08eb93547
54 changed files with 4617 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Core;
final class Autoloader
{
public static function register(string $rootPath): void
{
spl_autoload_register(static function (string $class) use ($rootPath): void {
$prefix = 'App\\';
if (!str_starts_with($class, $prefix)) {
return;
}
$relativeClass = substr($class, strlen($prefix));
$file = $rootPath . '/app/' . str_replace('\\', '/', $relativeClass) . '.php';
if (is_file($file)) {
require_once $file;
}
});
}
}