From 123a6c5ad97eb5cc7050820d5beb65d8e6edddd6 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 20 Oct 2020 23:13:48 +0200 Subject: [PATCH] Move middleware to a subfolder --- classes/Controller/FrontController.php | 2 +- classes/{ => Middleware}/CspMiddleware.php | 3 ++- classes/{ => Middleware}/LinkHeaderMiddleware.php | 2 +- classes/{ => Middleware}/LocaleMiddleware.php | 4 +++- classes/{ => Middleware}/RouterPathMiddleware.php | 2 +- index.php | 8 ++++---- tests/LocaleMiddlewareTest.php | 2 +- 7 files changed, 13 insertions(+), 10 deletions(-) rename classes/{ => Middleware}/CspMiddleware.php (97%) rename classes/{ => Middleware}/LinkHeaderMiddleware.php (96%) rename classes/{ => Middleware}/LocaleMiddleware.php (96%) rename classes/{ => Middleware}/RouterPathMiddleware.php (96%) diff --git a/classes/Controller/FrontController.php b/classes/Controller/FrontController.php index f46e326..912fc8d 100644 --- a/classes/Controller/FrontController.php +++ b/classes/Controller/FrontController.php @@ -6,11 +6,11 @@ namespace Alltube\Controller; -use Alltube\CspMiddleware; use Alltube\Library\Exception\PasswordException; use Alltube\Library\Exception\AlltubeLibraryException; use Alltube\Library\Exception\WrongPasswordException; use Alltube\Locale; +use Alltube\Middleware\CspMiddleware; use Exception; use Slim\Http\StatusCode; use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; diff --git a/classes/CspMiddleware.php b/classes/Middleware/CspMiddleware.php similarity index 97% rename from classes/CspMiddleware.php rename to classes/Middleware/CspMiddleware.php index fde3377..d5f24f0 100644 --- a/classes/CspMiddleware.php +++ b/classes/Middleware/CspMiddleware.php @@ -1,7 +1,8 @@