From d5205aa2c422e3fb84c0b6abeaf8d99b2a6388c1 Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Sat, 13 Apr 2024 09:53:02 +0200 Subject: [PATCH] #79 update header info + add v2.0.0 alpha->beta --- bin/edu | 24 +++++++++++-------- compose.yaml | 4 ++-- .../Commands/CheckStackCommand.php | 8 +++++++ .../Commands/CreateApiCommand.php | 8 +++++++ .../Commands/CreateCliCommand.php | 8 +++++++ .../Commands/CreateControllerCommand.php | 8 +++++++ src/EduFramework/Commands/DefaultCommand.php | 8 +++++++ .../CommandAlreadyExistsException.php | 8 +++++++ .../ControllerAlreadyExistsException.php | 8 +++++++ .../Exception/RouteAlreadyExistsException.php | 8 +++++++ .../Exception/ViewAlreadyExistsException.php | 8 +++++++ .../Commands/Extends/AppCommand.php | 8 +++++++ .../Commands/Extends/CkeckStack.php | 8 +++++++ .../Commands/Extends/CommandBanner.php | 8 +++++++ .../Commands/Extends/CommandManage.php | 8 +++++++ .../Commands/Extends/ListCommand.php | 8 +++++++ src/EduFramework/Commands/StartCommand.php | 8 +++++++ src/EduFramework/Core/ConfigCore.php | 20 +++++++++++++--- .../Core/Controller/BuildControllerTrait.php | 2 +- .../Core/Controller/ControllerInterface.php | 2 +- .../Core/Controller/DefaultController.php | 8 +++++++ .../Error/HttpError404Controller.php | 2 +- .../Error/HttpError405Controller.php | 2 +- .../Error/HttpErrorDefaultController.php | 2 +- .../Core/Controller/FastRouteCore.php | 2 +- src/EduFramework/Core/Controller/Request.php | 2 +- .../Exception/ErrorControllerException.php | 2 +- .../ErrorDatabaseNotExistException.php | 2 +- .../Exception/ErrorHttpStatusException.php | 2 +- .../Exception/NotDataResponseException.php | 2 +- src/EduFramework/Core/LoadCouchCore.php | 2 +- .../Core/Service/DatabaseInterface.php | 8 +++++++ .../Core/Service/DatabaseMariadb.php | 2 +- .../Core/Service/DatabaseMysql.php | 2 +- .../Core/Service/DatabaseService.php | 2 +- .../Core/View/StudooDebugExtension.php | 6 ++--- src/EduFramework/Core/View/TwigCore.php | 2 +- .../Core/View/studooBarreDebug.php | 4 ++-- src/EduFramework/Core/View/studooView.php | 4 ++-- 39 files changed, 192 insertions(+), 38 deletions(-) diff --git a/bin/edu b/bin/edu index 18c1e4e..93ce332 100644 --- a/bin/edu +++ b/bin/edu @@ -1,15 +1,19 @@ #!/usr/bin/env php 'EduFramework', - 'version' => 'v2.0.0@alpha', - 'date_version' => '2024-xx-xx', // Date de la livraison de la version + 'version' => 'v2.0.0@beta', + 'date_version' => '2024-04-13', // Date de la livraison de la version 'php_version' => '8.1', // Warning : bin/edu require PHP 8.1 or higher 'base_path' => '/', 'twig_path' => '/app/Template', @@ -81,16 +81,30 @@ public static function getEnv(string $key): mixed return strip_tags($_ENV[$key]); } + /** + * Permet de vérifier si une configuration existe + * @param string $key Clé de la configuration + * @return bool + */ public static function existEnv(string $key): bool { return isset($_ENV[$key]); } + /** + * Permet de renseigner les informations de la requête HTTP + * @param Request $request Récupère les informations de la requête HTTP + * @return void + */ public static function setRequest(Request $request): void { self::$resquest = $request; } + /** + * Retourne les informations de la requête HTTP + * @return Request + */ public static function getRequest(): Request { return self::$resquest; diff --git a/src/EduFramework/Core/Controller/BuildControllerTrait.php b/src/EduFramework/Core/Controller/BuildControllerTrait.php index cfaefaa..3a531df 100644 --- a/src/EduFramework/Core/Controller/BuildControllerTrait.php +++ b/src/EduFramework/Core/Controller/BuildControllerTrait.php @@ -1,6 +1,6 @@ + echo "
{$result}
-
"; + "; } } diff --git a/src/EduFramework/Core/View/TwigCore.php b/src/EduFramework/Core/View/TwigCore.php index a6aee79..5bff0e6 100644 --- a/src/EduFramework/Core/View/TwigCore.php +++ b/src/EduFramework/Core/View/TwigCore.php @@ -1,6 +1,6 @@