projetAcoBDDv30.03.26

This commit is contained in:
Aco
2026-03-30 16:10:26 +02:00
parent fedbf51c91
commit 455eee67f7
42 changed files with 2018 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Domain\Pages;
use App\Domain\Controller;
use App\Infrastructure\View;
/**
* Controller pour les pages sans lien avec un contenu spécifique.
* Exemple : Page d'accueil.
*/
class PagesController extends Controller {
public static function defineRoutes(): array
{
return [
self::Route( routeUrl: '/', routeName: 'home', routeAction: 'index', pageHeadTitle: "Home Page" ),
self::Route( routeUrl: '/test/{int}/', routeName: 'test', routeAction: 'test' ),
];
}
/**
* Route de la page d'accueil.
* @return void
*/
public function index(): View {
return new View( 'home', [ 'ok' => 'bla' ] );
}
public function test( string $id ): void {
echo "Coucou" . $id;
}
}