1 | <?php |
||
15 | trait ControllerSerializerTrait |
||
16 | { |
||
17 | /** |
||
18 | * @var SerializerInterface |
||
19 | */ |
||
20 | private $serializer; |
||
21 | |||
22 | public function setSerializer(SerializerInterface $serializer) |
||
26 | |||
27 | /** |
||
28 | * @param mixed $data |
||
29 | * @param int $status |
||
30 | * @param array $headers |
||
31 | * @param array $context |
||
32 | */ |
||
33 | protected function json($data, int $status = 200, array $headers = [], array $context = []) : JsonResponse |
||
43 | } |
||
44 |