version 0.8.0

This commit is contained in:
danny 2026-09-18 06:46:56 +02:00
parent f22007003a
commit e5ca9ef194
95 changed files with 5601 additions and 4042 deletions

28
app/Core/Config.php Normal file
View file

@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
/**
* Zentrale Konfiguration. Lädt das Array aus /config/config.php
* (liegt außerhalb des Webroots) und stellt es global bereit.
*/
final class Config
{
/** @var array<string,mixed> */
private static array $data = [];
public static function load(string $file): void
{
self::$data = require $file;
}
public static function get(string $key, mixed $default = null): mixed
{
return self::$data[$key] ?? $default;
}
/** @return array<string,mixed> */
public static function all(): array
{
return self::$data;
}
}