1 | <?php |
||
16 | class DefaultEndpoint implements Endpoint |
||
17 | { |
||
18 | /** |
||
19 | * @param APIRequest $request |
||
20 | * @return APIResponseData |
||
21 | * @throws UnsupportedMethodException |
||
22 | * @throws ElementNotFoundException |
||
23 | * @throws InvalidRequestException |
||
24 | */ |
||
25 | 1 | public function get(APIRequest $request): APIResponseData |
|
29 | |||
30 | /** |
||
31 | * @param APIRequest $request |
||
32 | * @return APIResponseData |
||
33 | * @throws UnsupportedMethodException |
||
34 | * @throws InvalidRequestException |
||
35 | */ |
||
36 | 1 | public function getAll(APIRequest $request): APIResponseData |
|
40 | |||
41 | /** |
||
42 | * @param APIRequest $request |
||
43 | * @return APIResponseData |
||
44 | * @throws UnsupportedMethodException |
||
45 | * @throws ElementNotFoundException |
||
46 | * @throws InvalidRequestException |
||
47 | * @throws ElementConflictException |
||
48 | */ |
||
49 | 1 | public function post(APIRequest $request): APIResponseData |
|
53 | |||
54 | /** |
||
55 | * @param APIRequest $request |
||
56 | * @return APIResponseData |
||
57 | * @throws UnsupportedMethodException |
||
58 | * @throws InvalidRequestException |
||
59 | * @throws ElementConflictException |
||
60 | */ |
||
61 | 1 | public function postAll(APIRequest $request): APIResponseData |
|
65 | |||
66 | /** |
||
67 | * @param APIRequest $request |
||
68 | * @return APIResponseData |
||
69 | * @throws UnsupportedMethodException |
||
70 | * @throws ElementNotFoundException |
||
71 | * @throws InvalidRequestException |
||
72 | * @throws ElementConflictException |
||
73 | */ |
||
74 | 1 | public function put(APIRequest $request): APIResponseData |
|
78 | |||
79 | /** |
||
80 | * @param APIRequest $request |
||
81 | * @return APIResponseData |
||
82 | * @throws UnsupportedMethodException |
||
83 | * @throws InvalidRequestException |
||
84 | * @throws ElementConflictException |
||
85 | */ |
||
86 | 1 | public function putAll(APIRequest $request): APIResponseData |
|
90 | |||
91 | /** |
||
92 | * @param APIRequest $request |
||
93 | * @return APIResponseData |
||
94 | * @throws UnsupportedMethodException |
||
95 | * @throws ElementNotFoundException |
||
96 | * @throws InvalidRequestException |
||
97 | * @throws ElementConflictException |
||
98 | */ |
||
99 | 1 | public function patch(APIRequest $request): APIResponseData |
|
100 | { |
||
101 | 1 | throw new UnsupportedMethodException('Method not supported'); |
|
102 | } |
||
103 | |||
104 | /** |
||
105 | * @param APIRequest $request |
||
106 | * @return APIResponseData |
||
107 | * @throws UnsupportedMethodException |
||
108 | * @throws InvalidRequestException |
||
109 | * @throws ElementConflictException |
||
110 | */ |
||
111 | 1 | public function patchAll(APIRequest $request): APIResponseData |
|
112 | { |
||
113 | 1 | throw new UnsupportedMethodException('Method not supported'); |
|
114 | } |
||
115 | |||
116 | /** |
||
117 | * @param APIRequest $request |
||
118 | * @return APIResponseData |
||
119 | * @throws UnsupportedMethodException |
||
120 | * @throws ElementNotFoundException |
||
121 | * @throws InvalidRequestException |
||
122 | */ |
||
123 | 1 | public function options(APIRequest $request): APIResponseData |
|
127 | |||
128 | /** |
||
129 | * @param APIRequest $request |
||
130 | * @return APIResponseData |
||
131 | * @throws UnsupportedMethodException |
||
132 | * @throws InvalidRequestException |
||
133 | */ |
||
134 | 1 | public function optionsAll(APIRequest $request): APIResponseData |
|
138 | |||
139 | /** |
||
140 | * @param APIRequest $request |
||
141 | * @return APIResponseData |
||
142 | * @throws UnsupportedMethodException |
||
143 | * @throws ElementNotFoundException |
||
144 | * @throws InvalidRequestException |
||
145 | */ |
||
146 | 1 | public function delete(APIRequest $request): APIResponseData |
|
150 | |||
151 | /** |
||
152 | * @param APIRequest $request |
||
153 | * @return APIResponseData |
||
154 | * @throws UnsupportedMethodException |
||
155 | * @throws InvalidRequestException |
||
156 | */ |
||
157 | 1 | public function deleteAll(APIRequest $request): APIResponseData |
|
161 | } |
||
162 |