From 0065ef476c6a497e873fbdc60a5967ba71c14628 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 26 Sep 2023 03:42:54 +0300 Subject: [PATCH] update bootstrap #14 --- src/config/bootstrap.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/config/bootstrap.php b/src/config/bootstrap.php index 23f0708..46fc8a4 100644 --- a/src/config/bootstrap.php +++ b/src/config/bootstrap.php @@ -86,13 +86,35 @@ if (isset($request['_route_'])) break; - case 'page/form': + case 'submit': + + require_once __DIR__ . '/../app/model/database.php'; + require_once __DIR__ . '/../app/model/validator.php'; + require_once __DIR__ . '/../app/model/locale.php'; + require_once __DIR__ . '/../app/model/website.php'; + require_once __DIR__ . '/../app/model/session.php'; require_once __DIR__ . '/../app/controller/page.php'; - $appControllerPage = new AppControllerPage(); + $appControllerPage = new AppControllerPage( + new AppModelDatabase( + Environment::config('database') + ), + new AppModelValidator( + Environment::config('validator') + ), + new AppModelLocale( + Environment::config('locales') + ), + new AppModelWebsite( + Environment::config('website') + ), + new AppModelSession( + $_SERVER['REMOTE_ADDR'] + ) + ); - $appControllerPage->renderFormDescription(); + $appControllerPage->renderFormSubmit(); break;