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