From 19f37061e0fd9cc55f51b54a788cb4e7949be3d1 Mon Sep 17 00:00:00 2001 From: anperederi Date: Tue, 26 Mar 2024 22:47:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/public/index.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Sources/public/index.php b/Sources/public/index.php index 05d7aaab..7c602aa4 100755 --- a/Sources/public/index.php +++ b/Sources/public/index.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../config/config.php'; - +echo "hello"; use App\AppCreator; use App\Router\Middleware\LoggingMiddleware; use App\Router\Request\RequestFactory; @@ -36,6 +36,7 @@ use Twig\Loader\FilesystemLoader; use Shared\IHashPassword; use Shared\HashPassword; use Shared\Log; + $appFactory = new AppCreator(); $appFactory->registerService(IArgumentResolver::class, ArgumentControllerResolver::class); $appFactory->registerSingleton(UserManager::class, UserManager::class); @@ -48,7 +49,7 @@ $appFactory->registerService(INotificationRepository::class, NotificationReposit $appFactory->registerService(IUserRepository::class, UserRepository::class); - +echo "hallo"; @@ -62,8 +63,11 @@ $appFactory->registerService(\Twig\Environment::class,\Twig\Environment::class); // $databaseContext = DatabaseContext::getInstance(); $appFactory->AddControllers(); + +echo "holla"; $app = $appFactory->create(); if (!is_null($app)){ + echo "va bien te faire ..."; // Ajout des Middleware /*$app->use(new LoggingMiddleware());*/ $app->use(new AuthMiddleware($appFactory->getDicontainer()->get(IAuthService::class) )); @@ -72,3 +76,4 @@ if (!is_null($app)){ $app->run(RequestFactory::createFromGlobals()); } +echo "meerde";