From 24192495cf6badc00e7babca0eecdd7e24a12217 Mon Sep 17 00:00:00 2001 From: Flo Date: Sat, 24 Feb 2024 20:35:39 +0100 Subject: [PATCH] restored content --- bin/createApi.php | 3 +- .../External/TagList/config/routes.php | 16 -------- .../TagList/config/service_manager.php | 17 --------- .../External/TagList/src/ConfigProvider.php | 16 -------- .../TagList/src/Handler/ReadListHandler.php | 38 ------------------- .../ReadListResponseFormatter.php | 15 -------- .../TagList/config/service_manager.php | 17 --------- .../TagList/src/ConfigProvider.php | 15 -------- .../Handler/Query/ReadList/ReadListQuery.php | 13 ------- .../Query/ReadList/ReadListQueryBuilder.php | 16 -------- .../Query/ReadList/ReadListQueryHandler.php | 18 --------- .../Query/ReadList/ReadListQueryResult.php | 13 ------- 12 files changed, 2 insertions(+), 195 deletions(-) delete mode 100644 src/ApiDomain/External/TagList/config/routes.php delete mode 100644 src/ApiDomain/External/TagList/config/service_manager.php delete mode 100644 src/ApiDomain/External/TagList/src/ConfigProvider.php delete mode 100644 src/ApiDomain/External/TagList/src/Handler/ReadListHandler.php delete mode 100644 src/ApiDomain/External/TagList/src/ResponseFormatter/ReadListResponseFormatter.php delete mode 100644 src/HandlingDomain/TagList/config/service_manager.php delete mode 100644 src/HandlingDomain/TagList/src/ConfigProvider.php delete mode 100644 src/HandlingDomain/TagList/src/Handler/Query/ReadList/ReadListQuery.php delete mode 100644 src/HandlingDomain/TagList/src/Handler/Query/ReadList/ReadListQueryBuilder.php delete mode 100644 src/HandlingDomain/TagList/src/Handler/Query/ReadList/ReadListQueryHandler.php delete mode 100644 src/HandlingDomain/TagList/src/Handler/Query/ReadList/ReadListQueryResult.php diff --git a/bin/createApi.php b/bin/createApi.php index 6c675c7..d39e6c4 100644 --- a/bin/createApi.php +++ b/bin/createApi.php @@ -14,6 +14,7 @@ $apiNamespace = $argv[2]; $apiName = $argv[3]; $cqrsType = strtolower($argv[4]) === 'true' ? 'Command' : 'Query'; $cqrsNamespace = $argv[5]; +$originalCqrsNamespace = $cqrsNamespace; $apiDirectoryPath = $projectSourceDirectory . 'ApiDomain/' . $apiType . '/' . $apiNamespace . '/'; $cqrsDirectoryPath = $projectSourceDirectory . 'HandlingDomain/' . $cqrsNamespace . '/'; @@ -164,7 +165,7 @@ return [ declare(strict_types=1); -namespace MyTube\Handling\{$cqrsNamespace}; +namespace MyTube\Handling\{$originalCqrsNamespace}; class ConfigProvider { diff --git a/src/ApiDomain/External/TagList/config/routes.php b/src/ApiDomain/External/TagList/config/routes.php deleted file mode 100644 index b1db99f..0000000 --- a/src/ApiDomain/External/TagList/config/routes.php +++ /dev/null @@ -1,16 +0,0 @@ - 'TODO.TODO', - 'path' => '/api/TODO/TODO[/]', - 'allowed_methods' => ['POST'], - 'middleware' => [ - ReadListHandler::class, - ], - ], -]; diff --git a/src/ApiDomain/External/TagList/config/service_manager.php b/src/ApiDomain/External/TagList/config/service_manager.php deleted file mode 100644 index ca1ecbc..0000000 --- a/src/ApiDomain/External/TagList/config/service_manager.php +++ /dev/null @@ -1,17 +0,0 @@ - [ - // Handler - ReadListHandler::class => AutoWiringFactory::class, - - // Response Formatter - ::class => AutoWiringFactory::class, - ], -]; diff --git a/src/ApiDomain/External/TagList/src/ConfigProvider.php b/src/ApiDomain/External/TagList/src/ConfigProvider.php deleted file mode 100644 index 9bd9982..0000000 --- a/src/ApiDomain/External/TagList/src/ConfigProvider.php +++ /dev/null @@ -1,16 +0,0 @@ - require __DIR__ . './../config/service_manager.php', - 'routes' => require __DIR__ . '/./../config/routes.php', - ]; - } -} diff --git a/src/ApiDomain/External/TagList/src/Handler/ReadListHandler.php b/src/ApiDomain/External/TagList/src/Handler/ReadListHandler.php deleted file mode 100644 index 8cc9195..0000000 --- a/src/ApiDomain/External/TagList/src/Handler/ReadListHandler.php +++ /dev/null @@ -1,38 +0,0 @@ -getBody()->getContents(), - true - ); - - $readListQuery = $this->readListQueryBuilder->build( - $data - ); - $result = $this->readListQueryHandler->execute($readListQuery); - - return new SuccessResponse($this->responseFormatter->format($result)); - } -} diff --git a/src/ApiDomain/External/TagList/src/ResponseFormatter/ReadListResponseFormatter.php b/src/ApiDomain/External/TagList/src/ResponseFormatter/ReadListResponseFormatter.php deleted file mode 100644 index 23d5563..0000000 --- a/src/ApiDomain/External/TagList/src/ResponseFormatter/ReadListResponseFormatter.php +++ /dev/null @@ -1,15 +0,0 @@ - [ - /// CQRS - // ReadList - ReadListQueryBuilder::class => AutoWiringFactory::class, - ReadListQueryHandler::class => AutoWiringFactory::class, - ], -]; diff --git a/src/HandlingDomain/TagList/src/ConfigProvider.php b/src/HandlingDomain/TagList/src/ConfigProvider.php deleted file mode 100644 index 4fa6c85..0000000 --- a/src/HandlingDomain/TagList/src/ConfigProvider.php +++ /dev/null @@ -1,15 +0,0 @@ - require __DIR__ . './../config/service_manager.php', - ]; - } -} diff --git a/src/HandlingDomain/TagList/src/Handler/Query/ReadList/ReadListQuery.php b/src/HandlingDomain/TagList/src/Handler/Query/ReadList/ReadListQuery.php deleted file mode 100644 index b35468b..0000000 --- a/src/HandlingDomain/TagList/src/Handler/Query/ReadList/ReadListQuery.php +++ /dev/null @@ -1,13 +0,0 @@ -