1 | <?php |
||
15 | trait JsonResponseTrait |
||
16 | { |
||
17 | /** |
||
18 | * @param \Psr\Http\Message\ResponseInterface $response |
||
19 | * @return \Psr\Http\Message\ResponseInterface |
||
20 | */ |
||
21 | protected function addHeaders(\Psr\Http\Message\ResponseInterface $response) |
||
25 | |||
26 | /** |
||
27 | * @param string $json |
||
28 | * |
||
29 | * @return \Symfony\Component\HttpFoundation\Response |
||
30 | */ |
||
31 | private function errorResponse($json) |
||
36 | |||
37 | /** |
||
38 | * @param string $json |
||
39 | * |
||
40 | * @return \Symfony\Component\HttpFoundation\Response |
||
41 | */ |
||
42 | private function resourceCreatedResponse($json) |
||
47 | |||
48 | /** |
||
49 | * @param string $json |
||
50 | * |
||
51 | * @return \Symfony\Component\HttpFoundation\Response |
||
52 | */ |
||
53 | private function resourceDeletedResponse($json) |
||
58 | |||
59 | /** |
||
60 | * @param string $json |
||
61 | * |
||
62 | * @return \Symfony\Component\HttpFoundation\Response |
||
63 | */ |
||
64 | private function resourceNotFoundResponse($json) |
||
69 | |||
70 | /** |
||
71 | * @param string $json |
||
72 | * |
||
73 | * @return \Symfony\Component\HttpFoundation\Response |
||
74 | */ |
||
75 | private function resourcePatchErrorResponse($json) |
||
80 | |||
81 | /** |
||
82 | * @param string $json |
||
83 | * |
||
84 | * @return \Symfony\Component\HttpFoundation\Response |
||
85 | */ |
||
86 | private function resourcePostErrorResponse($json) |
||
91 | |||
92 | /** |
||
93 | * @param string $json |
||
94 | * |
||
95 | * @return \Symfony\Component\HttpFoundation\Response |
||
96 | */ |
||
97 | private function resourceProcessingResponse($json) |
||
102 | |||
103 | /** |
||
104 | * @param string $json |
||
105 | * |
||
106 | * @return \Symfony\Component\HttpFoundation\Response |
||
107 | */ |
||
108 | private function resourceUpdatedResponse($json) |
||
113 | |||
114 | /** |
||
115 | * @param string $json |
||
116 | * |
||
117 | * @return \Symfony\Component\HttpFoundation\Response |
||
118 | */ |
||
119 | private function response($json) |
||
124 | |||
125 | /** |
||
126 | * @param string $json |
||
127 | * |
||
128 | * @return \Symfony\Component\HttpFoundation\Response |
||
129 | */ |
||
130 | private function unsupportedActionResponse($json) |
||
135 | } |
||
136 |