1
|
|
|
<?php |
2
|
|
|
namespace LunixREST\Endpoint; |
3
|
|
|
|
4
|
|
|
use LunixREST\Endpoint\Exceptions\UnsupportedMethodException; |
5
|
|
|
use LunixREST\Request\Request; |
6
|
|
|
use LunixREST\Response\ResponseData; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class Endpoint |
10
|
|
|
* @package LunixREST\Endpoints |
11
|
|
|
*/ |
12
|
|
|
class DefaultEndpoint implements Endpoint { |
13
|
|
|
/** |
14
|
|
|
* @param Request $request |
15
|
|
|
* @return ResponseData |
16
|
|
|
* @throws UnsupportedMethodException |
17
|
|
|
*/ |
18
|
|
|
public function get(Request $request): ResponseData { |
19
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @param Request $request |
24
|
|
|
* @return ResponseData |
25
|
|
|
* @throws UnsupportedMethodException |
26
|
|
|
*/ |
27
|
|
|
public function getAll(Request $request): ResponseData { |
28
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @param Request $request |
33
|
|
|
* @return ResponseData |
34
|
|
|
* @throws UnsupportedMethodException |
35
|
|
|
*/ |
36
|
|
|
public function post(Request $request): ResponseData { |
37
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @param Request $request |
42
|
|
|
* @return ResponseData |
43
|
|
|
* @throws UnsupportedMethodException |
44
|
|
|
*/ |
45
|
|
|
public function postAll(Request $request): ResponseData { |
46
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @param Request $request |
51
|
|
|
* @return ResponseData |
52
|
|
|
* @throws UnsupportedMethodException |
53
|
|
|
*/ |
54
|
|
|
public function put(Request $request): ResponseData { |
55
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @param Request $request |
60
|
|
|
* @return ResponseData |
61
|
|
|
* @throws UnsupportedMethodException |
62
|
|
|
*/ |
63
|
|
|
public function putAll(Request $request): ResponseData { |
64
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @param Request $request |
69
|
|
|
* @return ResponseData |
70
|
|
|
* @throws UnsupportedMethodException |
71
|
|
|
*/ |
72
|
|
|
public function options(Request $request): ResponseData { |
73
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param Request $request |
78
|
|
|
* @return ResponseData |
79
|
|
|
* @throws UnsupportedMethodException |
80
|
|
|
*/ |
81
|
|
|
public function optionsAll(Request $request): ResponseData { |
82
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @param Request $request |
87
|
|
|
* @return ResponseData |
88
|
|
|
* @throws UnsupportedMethodException |
89
|
|
|
*/ |
90
|
|
|
public function delete(Request $request): ResponseData { |
91
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param Request $request |
96
|
|
|
* @return ResponseData |
97
|
|
|
* @throws UnsupportedMethodException |
98
|
|
|
*/ |
99
|
|
|
public function deleteAll(Request $request): ResponseData { |
100
|
|
|
throw new UnsupportedMethodException('Method not supported'); |
101
|
|
|
} |
102
|
|
|
} |
103
|
|
|
|