1 | <?php |
||
11 | class StatusResponder implements ResponderInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var Httpstatus |
||
15 | */ |
||
16 | private $http_status; |
||
17 | |||
18 | /** |
||
19 | * @param Httpstatus $http_status |
||
20 | */ |
||
21 | 5 | public function __construct(Httpstatus $http_status) |
|
25 | |||
26 | /** |
||
27 | * @inheritDoc |
||
28 | */ |
||
29 | 5 | public function __invoke( |
|
40 | |||
41 | /** |
||
42 | * Determine if the payload has a status. |
||
43 | * |
||
44 | * @param PayloadInterface $payload |
||
45 | * |
||
46 | * @return boolean |
||
47 | */ |
||
48 | 5 | private function hasStatus(PayloadInterface $payload) |
|
52 | |||
53 | /** |
||
54 | * Get the response with the status code from the payload. |
||
55 | * |
||
56 | * @param ResponseInterface $response |
||
57 | * @param PayloadInterface $payload |
||
58 | * |
||
59 | * @return ResponseInterface |
||
60 | */ |
||
61 | 2 | private function status( |
|
70 | } |
||
71 |