1 | <?php |
||
5 | class Route |
||
6 | { |
||
7 | /** @var string */ |
||
8 | private $method; |
||
9 | /** @var string */ |
||
10 | private $controller; |
||
11 | /** @var array */ |
||
12 | private $context; |
||
13 | /** @var bool */ |
||
14 | private $defaultContext; |
||
15 | /** @var bool */ |
||
16 | private $inheritContext; |
||
17 | |||
18 | /** |
||
19 | * Route constructor. |
||
20 | * |
||
21 | * @param string $method |
||
22 | * @param string $controller |
||
23 | * @param array $context |
||
24 | * @param bool $defaultContext |
||
25 | * @param bool $inheritContext |
||
26 | */ |
||
27 | 2 | public function __construct( |
|
40 | |||
41 | /** |
||
42 | * @param boolean $defaultContext |
||
43 | */ |
||
44 | public function setDefaultContext($defaultContext) |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | 2 | public function getMethod() |
|
56 | |||
57 | /** |
||
58 | * @param string $method |
||
59 | */ |
||
60 | 2 | public function setMethod($method) |
|
64 | |||
65 | /** |
||
66 | * @return string[] |
||
67 | */ |
||
68 | 2 | public function getContext() |
|
72 | |||
73 | /** |
||
74 | * @param array $context |
||
75 | */ |
||
76 | public function setContext($context) |
||
80 | |||
81 | /** |
||
82 | * @return bool |
||
83 | */ |
||
84 | 2 | public function includeDefaultContext() |
|
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | 1 | public function getController() |
|
96 | |||
97 | /** |
||
98 | * @param string $controller |
||
99 | */ |
||
100 | public function setController($controller) |
||
104 | |||
105 | 2 | public function addContext($context) |
|
109 | |||
110 | /** @return bool */ |
||
111 | 2 | public function inheritContext() |
|
115 | } |
||
116 |