1 | <?php |
||
15 | trait HalJsonResponseTrait |
||
16 | { |
||
17 | /** |
||
18 | * @param \Psr\Http\Message\ResponseInterface $response |
||
19 | * |
||
20 | * @return \Psr\Http\Message\ResponseInterface |
||
21 | */ |
||
22 | protected function addHeaders(\Psr\Http\Message\ResponseInterface $response) |
||
26 | |||
27 | /** |
||
28 | * @param string $json |
||
29 | * |
||
30 | * @return \Symfony\Component\HttpFoundation\Response |
||
31 | */ |
||
32 | private function errorResponse($json) |
||
37 | |||
38 | /** |
||
39 | * @param string $json |
||
40 | * |
||
41 | * @return \Symfony\Component\HttpFoundation\Response |
||
42 | */ |
||
43 | private function resourceCreatedResponse($json) |
||
50 | |||
51 | /** |
||
52 | * @param string $json |
||
53 | * |
||
54 | * @return \Symfony\Component\HttpFoundation\Response |
||
55 | */ |
||
56 | private function resourceDeletedResponse($json) |
||
63 | |||
64 | /** |
||
65 | * @param string $json |
||
66 | * |
||
67 | * @return \Symfony\Component\HttpFoundation\Response |
||
68 | */ |
||
69 | private function resourceNotFoundResponse($json) |
||
76 | |||
77 | /** |
||
78 | * @param string $json |
||
79 | * |
||
80 | * @return \Symfony\Component\HttpFoundation\Response |
||
81 | */ |
||
82 | private function resourcePatchErrorResponse($json) |
||
89 | |||
90 | /** |
||
91 | * @param string $json |
||
92 | * |
||
93 | * @return \Symfony\Component\HttpFoundation\Response |
||
94 | */ |
||
95 | private function resourcePostErrorResponse($json) |
||
102 | |||
103 | /** |
||
104 | * @param string $json |
||
105 | * |
||
106 | * @return \Symfony\Component\HttpFoundation\Response |
||
107 | */ |
||
108 | private function resourceProcessingResponse($json) |
||
115 | |||
116 | /** |
||
117 | * @param string $json |
||
118 | * |
||
119 | * @return \Symfony\Component\HttpFoundation\Response |
||
120 | */ |
||
121 | private function resourceUpdatedResponse($json) |
||
128 | |||
129 | /** |
||
130 | * @param string $json |
||
131 | * |
||
132 | * @return \Symfony\Component\HttpFoundation\Response |
||
133 | */ |
||
134 | private function response($json) |
||
139 | |||
140 | /** |
||
141 | * @param string $json |
||
142 | * |
||
143 | * @return \Symfony\Component\HttpFoundation\Response |
||
144 | */ |
||
145 | private function unsupportedActionResponse($json) |
||
152 | } |
||
153 |