Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | interface Route |
||
14 | { |
||
15 | /** |
||
16 | * Sets route method |
||
17 | * |
||
18 | * @param string $method route method |
||
19 | * |
||
20 | * @return self for fluent interface |
||
21 | */ |
||
22 | public function setMethod(string $method) : Route; |
||
23 | |||
24 | /** |
||
25 | * Get route method |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | public function getMethod() : string; |
||
30 | |||
31 | /** |
||
32 | * Sets URL for route |
||
33 | * |
||
34 | * @param mixed $url route url |
||
35 | * |
||
36 | * @return self for fluent interface |
||
37 | */ |
||
38 | public function setUrl(string $url) : Route; |
||
39 | |||
40 | /** |
||
41 | * Get URL of route |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getUrl() : string; |
||
46 | |||
47 | /** |
||
48 | * Sets handler that will be executed if the url will match the route. |
||
49 | * |
||
50 | * @param mixed $handler handler which will be executed if the url will |
||
51 | * match the route |
||
52 | * |
||
53 | * @return self for fluent interface |
||
54 | */ |
||
55 | public function setHandler($handler); |
||
56 | |||
57 | /** |
||
58 | * Get handler |
||
59 | * |
||
60 | * @return mixed |
||
61 | */ |
||
62 | public function getHandler(); |
||
63 | } |
||
64 |