Files
landingpage-haus-schleusingen/public/index.php
greggy 3a30abc05e
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
fix: replace custom autoloader with composer PSR-4 autoloader
The custom autoloader used lowercase directory names which broke
after renaming app/core/ → app/Core/ and app/controllers/ → app/Controllers/
for PSR-4 compliance.
2026-05-22 19:19:28 +00:00

25 lines
604 B
PHP
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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);