All checks were successful
Deploy Feature Branch to Test / deploy (push) Successful in 29s
Lint / PHP Syntax Check (push) Successful in 37s
Lint / CSS Lint (stylelint) (push) Successful in 1m17s
Lint / HTML Lint (htmlhint) (push) Successful in 1m15s
Lint / PHP Syntax Check (pull_request) Successful in 32s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m12s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m8s
The custom autoloader used lowercase directory names which broke after renaming app/core/ → app/Core/ and app/controllers/ → app/Controllers/ for PSR-4 compliance.
25 lines
604 B
PHP
Executable File
25 lines
604 B
PHP
Executable File
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
/*
|
||
* Front Controller – Single Entry Point
|
||
* All requests are routed through this file.
|
||
*/
|
||
|
||
// Autoloader (composer PSR-4)
|
||
require_once __DIR__ . '/../vendor/autoload.php';
|
||
|
||
use App\Core\Router;
|
||
|
||
$router = new Router();
|
||
|
||
// Define routes
|
||
$router->addRoute('/', \App\Controllers\HomeController::class, 'index');
|
||
$router->addRoute('/impressum', \App\Controllers\ImpressumController::class, 'index');
|
||
$router->addRoute('/datenschutz', \App\Controllers\DatenschutzController::class, 'index');
|
||
|
||
// Dispatch
|
||
$uri = $_SERVER['REQUEST_URI'] ?? '/';
|
||
$router->dispatch($uri);
|