1 | <?php |
||
14 | final class ResponseManager implements ResponseManagerInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var DeserializerInterface |
||
18 | */ |
||
19 | private $deserializer; |
||
20 | |||
21 | /** |
||
22 | * @var ResponseFactoryInterface |
||
23 | */ |
||
24 | private $responseFactory; |
||
25 | |||
26 | /** |
||
27 | * @var SerializerInterface |
||
28 | */ |
||
29 | private $serializer; |
||
30 | |||
31 | /** |
||
32 | * @param DeserializerInterface $deserializer |
||
33 | * @param ResponseFactoryInterface $responseFactory |
||
34 | * @param SerializerInterface $serializer |
||
35 | */ |
||
36 | 7 | public function __construct( |
|
45 | |||
46 | /** |
||
47 | * @param object $object |
||
48 | * @param string $accept |
||
49 | * @param int $status |
||
50 | * @param NormalizerContextInterface|null $context |
||
51 | * |
||
52 | * @return ResponseInterface |
||
53 | */ |
||
54 | 2 | public function create( |
|
67 | |||
68 | /** |
||
69 | * @param string $accept |
||
70 | * @param int $status |
||
71 | * |
||
72 | * @return ResponseInterface |
||
73 | */ |
||
74 | 2 | public function createEmpty(string $accept, int $status = 204): ResponseInterface |
|
78 | |||
79 | /** |
||
80 | * @param string $location |
||
81 | * @param int $status |
||
82 | * |
||
83 | * @return ResponseInterface |
||
84 | */ |
||
85 | 2 | public function createRedirect(string $location, int $status = 307): ResponseInterface |
|
89 | |||
90 | /** |
||
91 | * @param ApiProblemInterface $apiProblem |
||
92 | * @param string $accept |
||
93 | * @param NormalizerContextInterface $context |
||
94 | * |
||
95 | * @return ResponseInterface |
||
96 | */ |
||
97 | 1 | public function createFromApiProblem( |
|
116 | } |
||
117 |