1 | <?php |
||
15 | class ActionHandler |
||
16 | { |
||
17 | use ResolverTrait; |
||
18 | |||
19 | const ACTION_ATTRIBUTE = 'equip/adr:action'; |
||
20 | |||
21 | /** |
||
22 | * @param ResolverInterface $resolver |
||
23 | */ |
||
24 | 1 | public function __construct(ResolverInterface $resolver) |
|
28 | |||
29 | /** |
||
30 | * @param ServerRequestInterface $request |
||
31 | * @param ResponseInterface $response |
||
32 | * @param callable $next |
||
33 | */ |
||
34 | 1 | public function __invoke( |
|
46 | |||
47 | /** |
||
48 | * Use the action collaborators to get a response. |
||
49 | * |
||
50 | * @param Action $action |
||
51 | * @param ServerRequestInterface $request |
||
52 | * @param ResponseInterface $response |
||
53 | * |
||
54 | * @return ResponseInterface |
||
55 | */ |
||
56 | 1 | private function handle( |
|
70 | |||
71 | /** |
||
72 | * Execute the domain to get a payload using input from the request. |
||
73 | * |
||
74 | * @param DomainInterface $domain |
||
75 | * @param InputInterface $input |
||
76 | * @param ServerRequestInterface $request |
||
77 | * |
||
78 | * @return PayloadInterface |
||
79 | */ |
||
80 | 1 | private function payload( |
|
87 | |||
88 | /** |
||
89 | * Execute the responder to marshall the payload into the response. |
||
90 | * |
||
91 | * @param ResponderInterface $responder |
||
92 | * @param ServerRequestInterface $request |
||
93 | * @param ResponseInterface $response |
||
94 | * @param PayloadInterface $payload |
||
95 | * |
||
96 | * @return ResponseInterface |
||
97 | */ |
||
98 | 1 | private function response( |
|
106 | } |
||
107 |