1 | <?php |
||
12 | class Route |
||
13 | { |
||
14 | use Bindable; |
||
15 | |||
16 | /** |
||
17 | * method |
||
18 | * |
||
19 | * @var mixed |
||
20 | * @access protected |
||
21 | */ |
||
22 | protected $method; |
||
23 | |||
24 | /** |
||
25 | * pattern |
||
26 | * |
||
27 | * @var mixed |
||
28 | * @access protected |
||
29 | */ |
||
30 | protected $pattern; |
||
31 | |||
32 | /** |
||
33 | * handler |
||
34 | * |
||
35 | * @var mixed |
||
36 | * @access protected |
||
37 | */ |
||
38 | protected $handler; |
||
39 | |||
40 | /** |
||
41 | * group |
||
42 | * |
||
43 | * @var mixed |
||
44 | * @access protected |
||
45 | */ |
||
46 | protected $group; |
||
47 | |||
48 | /** |
||
49 | * identifier |
||
50 | * |
||
51 | * @var mixed |
||
52 | * @access protected |
||
53 | */ |
||
54 | protected $identifier; |
||
55 | |||
56 | /** |
||
57 | * args |
||
58 | * |
||
59 | * @var mixed |
||
60 | * @access protected |
||
61 | */ |
||
62 | protected $args; |
||
63 | |||
64 | /** |
||
65 | * __construct function. |
||
66 | * |
||
67 | * @access public |
||
68 | * @param string $method |
||
69 | * @param string $pattern |
||
70 | * @param mixed $handler |
||
71 | * @param string $group (default: '') |
||
72 | * @param string $identifier (default: '') |
||
73 | */ |
||
74 | public function __construct(string $method, string $pattern, $handler, $group = '', $identifier = '') |
||
82 | |||
83 | /** |
||
84 | * getMethod function. |
||
85 | * |
||
86 | * @access public |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getMethod() |
||
93 | |||
94 | /** |
||
95 | * setMethod function. |
||
96 | * |
||
97 | * @access public |
||
98 | * @param string $method |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function setMethod(string $method) |
||
106 | |||
107 | /** |
||
108 | * getPattern function. |
||
109 | * |
||
110 | * @access public |
||
111 | * @return string |
||
112 | */ |
||
113 | public function getPattern() |
||
117 | |||
118 | /** |
||
119 | * setPattern function. |
||
120 | * |
||
121 | * @access public |
||
122 | * @param string $pattern |
||
123 | * @return $this |
||
124 | */ |
||
125 | public function setPattern(string $pattern) |
||
130 | |||
131 | /** |
||
132 | * getHandler function. |
||
133 | * |
||
134 | * @access public |
||
135 | * @return callable|string |
||
136 | */ |
||
137 | public function getHandler() |
||
141 | |||
142 | |||
143 | /** |
||
144 | * setHandler function. |
||
145 | * |
||
146 | * @access public |
||
147 | * @param string $handler |
||
148 | * @return $this |
||
149 | */ |
||
150 | public function setHandler(string $handler) |
||
156 | |||
157 | /** |
||
158 | * getGroup function. |
||
159 | * |
||
160 | * @access public |
||
161 | * @return array |
||
162 | */ |
||
163 | public function getGroup() |
||
167 | |||
168 | /** |
||
169 | * setGroup function. |
||
170 | * |
||
171 | * @access public |
||
172 | * @param string $group |
||
173 | * @return $this |
||
174 | */ |
||
175 | public function setGroup(string $group) |
||
181 | |||
182 | /** |
||
183 | * getIdentifier function. |
||
184 | * |
||
185 | * @access public |
||
186 | * @return string |
||
187 | */ |
||
188 | public function getIdentifier() |
||
192 | |||
193 | /** |
||
194 | * setIdentifier function. |
||
195 | * |
||
196 | * @access public |
||
197 | * @param string $identifier |
||
198 | * @return $this |
||
199 | */ |
||
200 | public function setIdentifier(string $identifier) |
||
206 | |||
207 | /** |
||
208 | * setArgs function. |
||
209 | * |
||
210 | * @access public |
||
211 | * @param mixed $args |
||
212 | * @return $this |
||
213 | */ |
||
214 | public function setArgs($args) |
||
220 | |||
221 | /** |
||
222 | * getArgs function. |
||
223 | * |
||
224 | * @access public |
||
225 | * @return array |
||
226 | */ |
||
227 | public function getArgs() |
||
231 | } |
||
232 |