diff --git a/module/Rest/config/auth.config.php b/module/Rest/config/auth.config.php index b43c333f..c60cc358 100644 --- a/module/Rest/config/auth.config.php +++ b/module/Rest/config/auth.config.php @@ -8,7 +8,7 @@ return [ 'auth' => [ 'routes_whitelist' => [ Action\AuthenticateAction::class, - Action\ShortCode\SingleStepCreateShortCodeAction::class, + Action\ShortUrl\SingleStepCreateShortUrlAction::class, ], ], diff --git a/module/Rest/config/dependencies.config.php b/module/Rest/config/dependencies.config.php index ae500a22..8b8a4f02 100644 --- a/module/Rest/config/dependencies.config.php +++ b/module/Rest/config/dependencies.config.php @@ -20,14 +20,14 @@ return [ ApiKeyService::class => ConfigAbstractFactory::class, Action\AuthenticateAction::class => ConfigAbstractFactory::class, - Action\ShortCode\CreateShortCodeAction::class => ConfigAbstractFactory::class, - Action\ShortCode\SingleStepCreateShortCodeAction::class => ConfigAbstractFactory::class, - Action\ShortCode\EditShortCodeAction::class => ConfigAbstractFactory::class, - Action\ShortCode\DeleteShortCodeAction::class => ConfigAbstractFactory::class, - Action\ShortCode\ResolveUrlAction::class => ConfigAbstractFactory::class, + Action\ShortUrl\CreateShortUrlAction::class => ConfigAbstractFactory::class, + Action\ShortUrl\SingleStepCreateShortUrlAction::class => ConfigAbstractFactory::class, + Action\ShortUrl\EditShortUrlAction::class => ConfigAbstractFactory::class, + Action\ShortUrl\DeleteShortUrlAction::class => ConfigAbstractFactory::class, + Action\ShortUrl\ResolveShortUrlAction::class => ConfigAbstractFactory::class, Action\Visit\GetVisitsAction::class => ConfigAbstractFactory::class, - Action\ShortCode\ListShortCodesAction::class => ConfigAbstractFactory::class, - Action\ShortCode\EditShortCodeTagsAction::class => ConfigAbstractFactory::class, + Action\ShortUrl\ListShortUrlsAction::class => ConfigAbstractFactory::class, + Action\ShortUrl\EditShortUrlTagsAction::class => ConfigAbstractFactory::class, Action\Tag\ListTagsAction::class => ConfigAbstractFactory::class, Action\Tag\DeleteTagsAction::class => ConfigAbstractFactory::class, Action\Tag\CreateTagsAction::class => ConfigAbstractFactory::class, @@ -46,38 +46,38 @@ return [ ApiKeyService::class => ['em'], Action\AuthenticateAction::class => [ApiKeyService::class, JWTService::class, 'translator', 'Logger_Shlink'], - Action\ShortCode\CreateShortCodeAction::class => [ + Action\ShortUrl\CreateShortUrlAction::class => [ Service\UrlShortener::class, 'translator', 'config.url_shortener.domain', 'Logger_Shlink', ], - Action\ShortCode\SingleStepCreateShortCodeAction::class => [ + Action\ShortUrl\SingleStepCreateShortUrlAction::class => [ Service\UrlShortener::class, 'translator', ApiKeyService::class, 'config.url_shortener.domain', 'Logger_Shlink', ], - Action\ShortCode\EditShortCodeAction::class => [Service\ShortUrlService::class, 'translator', 'Logger_Shlink'], - Action\ShortCode\DeleteShortCodeAction::class => [ + Action\ShortUrl\EditShortUrlAction::class => [Service\ShortUrlService::class, 'translator', 'Logger_Shlink'], + Action\ShortUrl\DeleteShortUrlAction::class => [ Service\ShortUrl\DeleteShortUrlService::class, 'translator', 'Logger_Shlink', ], - Action\ShortCode\ResolveUrlAction::class => [ + Action\ShortUrl\ResolveShortUrlAction::class => [ Service\UrlShortener::class, 'translator', 'config.url_shortener.domain', ], Action\Visit\GetVisitsAction::class => [Service\VisitsTracker::class, 'translator', 'Logger_Shlink'], - Action\ShortCode\ListShortCodesAction::class => [ + Action\ShortUrl\ListShortUrlsAction::class => [ Service\ShortUrlService::class, 'translator', 'config.url_shortener.domain', 'Logger_Shlink', ], - Action\ShortCode\EditShortCodeTagsAction::class => [ + Action\ShortUrl\EditShortUrlTagsAction::class => [ Service\ShortUrlService::class, 'translator', 'Logger_Shlink', diff --git a/module/Rest/config/routes.config.php b/module/Rest/config/routes.config.php index 7058ad59..b1ab3d78 100644 --- a/module/Rest/config/routes.config.php +++ b/module/Rest/config/routes.config.php @@ -11,17 +11,17 @@ return [ Action\AuthenticateAction::getRouteDef(), // Short codes - Action\ShortCode\CreateShortCodeAction::getRouteDef([ + Action\ShortUrl\CreateShortUrlAction::getRouteDef([ Middleware\ShortCode\CreateShortCodeContentNegotiationMiddleware::class, ]), - Action\ShortCode\SingleStepCreateShortCodeAction::getRouteDef([ + Action\ShortUrl\SingleStepCreateShortUrlAction::getRouteDef([ Middleware\ShortCode\CreateShortCodeContentNegotiationMiddleware::class, ]), - Action\ShortCode\EditShortCodeAction::getRouteDef(), - Action\ShortCode\DeleteShortCodeAction::getRouteDef(), - Action\ShortCode\ResolveUrlAction::getRouteDef(), - Action\ShortCode\ListShortCodesAction::getRouteDef(), - Action\ShortCode\EditShortCodeTagsAction::getRouteDef(), + Action\ShortUrl\EditShortUrlAction::getRouteDef(), + Action\ShortUrl\DeleteShortUrlAction::getRouteDef(), + Action\ShortUrl\ResolveShortUrlAction::getRouteDef(), + Action\ShortUrl\ListShortUrlsAction::getRouteDef(), + Action\ShortUrl\EditShortUrlTagsAction::getRouteDef(), // Visits Action\Visit\GetVisitsAction::getRouteDef(), diff --git a/module/Rest/src/Action/ShortCode/AbstractCreateShortCodeAction.php b/module/Rest/src/Action/ShortUrl/AbstractCreateShortUrlAction.php similarity index 97% rename from module/Rest/src/Action/ShortCode/AbstractCreateShortCodeAction.php rename to module/Rest/src/Action/ShortUrl/AbstractCreateShortUrlAction.php index 833f49c6..fbf1817a 100644 --- a/module/Rest/src/Action/ShortCode/AbstractCreateShortCodeAction.php +++ b/module/Rest/src/Action/ShortUrl/AbstractCreateShortUrlAction.php @@ -1,7 +1,7 @@ urlShortener = $this->prophesize(UrlShortener::class); - $this->action = new CreateShortCodeAction($this->urlShortener->reveal(), Translator::factory([]), [ + $this->action = new CreateShortUrlAction($this->urlShortener->reveal(), Translator::factory([]), [ 'schema' => 'http', 'hostname' => 'foo.com', ]); diff --git a/module/Rest/test/Action/ShortCode/DeleteShortCodeActionTest.php b/module/Rest/test/Action/ShortUrl/DeleteShortUrlActionTest.php similarity index 86% rename from module/Rest/test/Action/ShortCode/DeleteShortCodeActionTest.php rename to module/Rest/test/Action/ShortUrl/DeleteShortUrlActionTest.php index 3c5a5c87..abcd61cf 100644 --- a/module/Rest/test/Action/ShortCode/DeleteShortCodeActionTest.php +++ b/module/Rest/test/Action/ShortUrl/DeleteShortUrlActionTest.php @@ -1,23 +1,23 @@ service = $this->prophesize(DeleteShortUrlServiceInterface::class); - $this->action = new DeleteShortCodeAction($this->service->reveal(), Translator::factory([])); + $this->action = new DeleteShortUrlAction($this->service->reveal(), Translator::factory([])); } /** diff --git a/module/Rest/test/Action/ShortCode/EditShortCodeActionTest.php b/module/Rest/test/Action/ShortUrl/EditShortUrlActionTest.php similarity index 90% rename from module/Rest/test/Action/ShortCode/EditShortCodeActionTest.php rename to module/Rest/test/Action/ShortUrl/EditShortUrlActionTest.php index e96ccdf8..e0cfb13e 100644 --- a/module/Rest/test/Action/ShortCode/EditShortCodeActionTest.php +++ b/module/Rest/test/Action/ShortUrl/EditShortUrlActionTest.php @@ -1,7 +1,7 @@ shortUrlService = $this->prophesize(ShortUrlServiceInterface::class); - $this->action = new EditShortCodeAction($this->shortUrlService->reveal(), Translator::factory([])); + $this->action = new EditShortUrlAction($this->shortUrlService->reveal(), Translator::factory([])); } /** diff --git a/module/Rest/test/Action/ShortCode/EditShortCodeTagsActionTest.php b/module/Rest/test/Action/ShortUrl/EditShortUrlTagsActionTest.php similarity index 86% rename from module/Rest/test/Action/ShortCode/EditShortCodeTagsActionTest.php rename to module/Rest/test/Action/ShortUrl/EditShortUrlTagsActionTest.php index d7eab463..dc4b4a5c 100644 --- a/module/Rest/test/Action/ShortCode/EditShortCodeTagsActionTest.php +++ b/module/Rest/test/Action/ShortUrl/EditShortUrlTagsActionTest.php @@ -1,21 +1,21 @@ shortUrlService = $this->prophesize(ShortUrlService::class); - $this->action = new EditShortCodeTagsAction($this->shortUrlService->reveal(), Translator::factory([])); + $this->action = new EditShortUrlTagsAction($this->shortUrlService->reveal(), Translator::factory([])); } /** diff --git a/module/Rest/test/Action/ShortCode/ListShortCodesActionTest.php b/module/Rest/test/Action/ShortUrl/ListShortUrlsActionTest.php similarity index 84% rename from module/Rest/test/Action/ShortCode/ListShortCodesActionTest.php rename to module/Rest/test/Action/ShortUrl/ListShortUrlsActionTest.php index 7c414e44..eecbb8d8 100644 --- a/module/Rest/test/Action/ShortCode/ListShortCodesActionTest.php +++ b/module/Rest/test/Action/ShortUrl/ListShortUrlsActionTest.php @@ -1,21 +1,21 @@ service = $this->prophesize(ShortUrlService::class); - $this->action = new ListShortCodesAction($this->service->reveal(), Translator::factory([]), [ + $this->action = new ListShortUrlsAction($this->service->reveal(), Translator::factory([]), [ 'hostname' => 'doma.in', 'schema' => 'https', ]); diff --git a/module/Rest/test/Action/ShortCode/ResolveUrlActionTest.php b/module/Rest/test/Action/ShortUrl/ResolveShortUrlActionTest.php similarity index 91% rename from module/Rest/test/Action/ShortCode/ResolveUrlActionTest.php rename to module/Rest/test/Action/ShortUrl/ResolveShortUrlActionTest.php index bde3e89a..a6159ec1 100644 --- a/module/Rest/test/Action/ShortCode/ResolveUrlActionTest.php +++ b/module/Rest/test/Action/ShortUrl/ResolveShortUrlActionTest.php @@ -1,7 +1,7 @@ urlShortener = $this->prophesize(UrlShortener::class); - $this->action = new ResolveUrlAction($this->urlShortener->reveal(), Translator::factory([]), []); + $this->action = new ResolveShortUrlAction($this->urlShortener->reveal(), Translator::factory([]), []); } /** diff --git a/module/Rest/test/Action/ShortCode/SingleStepCreateShortCodeActionTest.php b/module/Rest/test/Action/ShortUrl/SingleStepCreateShortUrlActionTest.php similarity index 92% rename from module/Rest/test/Action/ShortCode/SingleStepCreateShortCodeActionTest.php rename to module/Rest/test/Action/ShortUrl/SingleStepCreateShortUrlActionTest.php index 0a7d6981..438132cb 100644 --- a/module/Rest/test/Action/ShortCode/SingleStepCreateShortCodeActionTest.php +++ b/module/Rest/test/Action/ShortUrl/SingleStepCreateShortUrlActionTest.php @@ -1,7 +1,7 @@ urlShortener = $this->prophesize(UrlShortenerInterface::class); $this->apiKeyService = $this->prophesize(ApiKeyServiceInterface::class); - $this->action = new SingleStepCreateShortCodeAction( + $this->action = new SingleStepCreateShortUrlAction( $this->urlShortener->reveal(), Translator::factory([]), $this->apiKeyService->reveal(),