1 | <?php |
||
8 | trait Routeable |
||
9 | { |
||
10 | /** |
||
11 | * get function. |
||
12 | * |
||
13 | * @access public |
||
14 | * @param string $pattern |
||
15 | * @param mixed $handler |
||
16 | * @return Route |
||
17 | */ |
||
18 | public function get(string $pattern, $handler) |
||
22 | |||
23 | /** |
||
24 | * post function. |
||
25 | * |
||
26 | * @access public |
||
27 | * @param string $pattern |
||
28 | * @param mixed $handler |
||
29 | * @return Route |
||
30 | */ |
||
31 | public function post(string $pattern, $handler) |
||
35 | |||
36 | /** |
||
37 | * put function. |
||
38 | * |
||
39 | * @access public |
||
40 | * @param string $pattern |
||
41 | * @param mixed $handler |
||
42 | * @return Route |
||
43 | */ |
||
44 | public function put(string $pattern, $handler) |
||
48 | |||
49 | /** |
||
50 | * patch function. |
||
51 | * |
||
52 | * @access public |
||
53 | * @param string $pattern |
||
54 | * @param mixed $handler |
||
55 | * @return Route |
||
56 | */ |
||
57 | public function patch(string $pattern, $handler) |
||
61 | |||
62 | /** |
||
63 | * delete function. |
||
64 | * |
||
65 | * @access public |
||
66 | * @param string $pattern |
||
67 | * @param mixed $handler |
||
68 | * @return Route |
||
69 | */ |
||
70 | public function delete(string $pattern, $handler) |
||
74 | |||
75 | /** |
||
76 | * options function. |
||
77 | * |
||
78 | * @access public |
||
79 | * @param string $pattern |
||
80 | * @param mixed $handler |
||
81 | * @return Route |
||
82 | */ |
||
83 | public function options(string $pattern, $handler) |
||
87 | |||
88 | /** |
||
89 | * any function. |
||
90 | * |
||
91 | * @access public |
||
92 | * @param string $pattern |
||
93 | * @param mixed $handler |
||
94 | * @return Route |
||
95 | */ |
||
96 | public function any(string $pattern, $handler) |
||
100 | |||
101 | /** |
||
102 | * map function. |
||
103 | * |
||
104 | * @access public |
||
105 | * @abstract |
||
106 | * @param mixed $methods |
||
107 | * @param string $pattern |
||
108 | * @param mixed $handler |
||
109 | * @return Route |
||
110 | */ |
||
111 | abstract public function map($methods, string $pattern, $handler); |
||
112 | } |
||
113 |