From 698f50ad0a9d220956a06c917f1b42678566f187 Mon Sep 17 00:00:00 2001 From: odan Date: Fri, 25 Oct 2019 13:28:07 +0200 Subject: [PATCH] Update docs --- docs/controllers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/controllers.md b/docs/controllers.md index c2e75ad9e..917189d0d 100644 --- a/docs/controllers.md +++ b/docs/controllers.md @@ -18,7 +18,7 @@ The domain service layer then returns data that the Controller injects into a Vi A view might be HTML for a standard web request; or, it might be something like JSON for a RESTful API request. -This application uses `Single Action Controllers` which means: One action per class. +This application uses `Single Action Controllers` which means: **One action per class**. A action method signature (with all parameters) should look like this: @@ -48,7 +48,7 @@ final class ExampleAction $this->responseFactory = $responseFactory; } - public function __invoke(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface + public function __invoke(ServerRequestInterface $request): ResponseInterface { $response = $this->responseFactory->createResponse(); $response->getBody()->write('Hello, World!');