UserFindAction
in package
FinalYes
Action.
Table of Contents
Properties
Methods
- __construct() : mixed
- The constructor.
- __invoke() : ResponseInterface
- Action.
- transform() : ResponseInterface
- Transform to json response.
Properties
$responder
private
Responder
$responder
$userFinder
private
UserFinder
$userFinder
Methods
__construct()
The constructor.
public
__construct(UserFinder $userIndex, Responder $responder) : mixed
Parameters
- $userIndex : UserFinder
-
The user index list viewer
- $responder : Responder
-
The responder
__invoke()
Action.
public
__invoke(ServerRequestInterface $request, ResponseInterface $response) : ResponseInterface
Parameters
- $request : ServerRequestInterface
-
The request
- $response : ResponseInterface
-
The response
Return values
ResponseInterface —The response
transform()
Transform to json response.
private
transform(ResponseInterface $response, array<string|int, mixed> $users) : ResponseInterface
This could also be done within a specific Responder class.
Parameters
- $response : ResponseInterface
-
The response
- $users : array<string|int, mixed>
-
The users
Return values
ResponseInterface —The response