From 622edd2ed17b9bab49e78fe670bdf89de90b2571 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 20 Sep 2018 20:00:53 +0200 Subject: [PATCH] Renamed rest middlewares to use the short-url concept instead of the short-code concept --- module/Rest/config/dependencies.config.php | 2 +- module/Rest/config/routes.config.php | 4 ++-- .../CreateShortUrlContentNegotiationMiddleware.php} | 4 ++-- ...CreateShortUrlContentNegotiationMiddlewareTest.php} | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) rename module/Rest/src/Middleware/{ShortCode/CreateShortCodeContentNegotiationMiddleware.php => ShortUrl/CreateShortUrlContentNegotiationMiddleware.php} (94%) rename module/Rest/test/Middleware/{ShortCode/CreateShortCodeContentNegotiationMiddlewareTest.php => ShortUrl/CreateShortUrlContentNegotiationMiddlewareTest.php} (90%) diff --git a/module/Rest/config/dependencies.config.php b/module/Rest/config/dependencies.config.php index 8b8a4f02..595377d7 100644 --- a/module/Rest/config/dependencies.config.php +++ b/module/Rest/config/dependencies.config.php @@ -37,7 +37,7 @@ return [ Middleware\CrossDomainMiddleware::class => InvokableFactory::class, Middleware\PathVersionMiddleware::class => InvokableFactory::class, Middleware\CheckAuthenticationMiddleware::class => ConfigAbstractFactory::class, - Middleware\ShortCode\CreateShortCodeContentNegotiationMiddleware::class => InvokableFactory::class, + Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class => InvokableFactory::class, ], ], diff --git a/module/Rest/config/routes.config.php b/module/Rest/config/routes.config.php index b1ab3d78..a937bc42 100644 --- a/module/Rest/config/routes.config.php +++ b/module/Rest/config/routes.config.php @@ -12,10 +12,10 @@ return [ // Short codes Action\ShortUrl\CreateShortUrlAction::getRouteDef([ - Middleware\ShortCode\CreateShortCodeContentNegotiationMiddleware::class, + Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class, ]), Action\ShortUrl\SingleStepCreateShortUrlAction::getRouteDef([ - Middleware\ShortCode\CreateShortCodeContentNegotiationMiddleware::class, + Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class, ]), Action\ShortUrl\EditShortUrlAction::getRouteDef(), Action\ShortUrl\DeleteShortUrlAction::getRouteDef(), diff --git a/module/Rest/src/Middleware/ShortCode/CreateShortCodeContentNegotiationMiddleware.php b/module/Rest/src/Middleware/ShortUrl/CreateShortUrlContentNegotiationMiddleware.php similarity index 94% rename from module/Rest/src/Middleware/ShortCode/CreateShortCodeContentNegotiationMiddleware.php rename to module/Rest/src/Middleware/ShortUrl/CreateShortUrlContentNegotiationMiddleware.php index 3a2f0f4d..8ea8f259 100644 --- a/module/Rest/src/Middleware/ShortCode/CreateShortCodeContentNegotiationMiddleware.php +++ b/module/Rest/src/Middleware/ShortUrl/CreateShortUrlContentNegotiationMiddleware.php @@ -1,7 +1,7 @@ middleware = new CreateShortCodeContentNegotiationMiddleware(); + $this->middleware = new CreateShortUrlContentNegotiationMiddleware(); $this->requestHandler = $this->prophesize(RequestHandlerInterface::class); }