1 | <?php |
||
11 | class Route |
||
12 | { |
||
13 | /** @var string */ |
||
14 | private $method; |
||
15 | /** @var string */ |
||
16 | private $controller; |
||
17 | /** @var array */ |
||
18 | private $context; |
||
19 | /** @var bool */ |
||
20 | private $defaultContext; |
||
21 | /** @var bool */ |
||
22 | private $inheritContext; |
||
23 | |||
24 | /** |
||
25 | * Route constructor. |
||
26 | * |
||
27 | * @param string $method |
||
28 | * @param string $controller |
||
29 | * @param array $context |
||
30 | * @param bool $defaultContext |
||
31 | * @param bool $inheritContext |
||
32 | */ |
||
33 | 8 | public function __construct( |
|
47 | |||
48 | /** |
||
49 | * @param boolean $defaultContext |
||
50 | */ |
||
51 | public function setDefaultContext($defaultContext) |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | 8 | public function getMethod() |
|
63 | |||
64 | /** |
||
65 | * @param string $method |
||
66 | */ |
||
67 | public function setMethod($method) |
||
71 | |||
72 | /** |
||
73 | * @return string[] |
||
74 | */ |
||
75 | 7 | public function getContext() |
|
79 | |||
80 | /** |
||
81 | * @param array $context |
||
82 | */ |
||
83 | public function setContext($context) |
||
87 | |||
88 | /** |
||
89 | * @return bool |
||
90 | */ |
||
91 | 7 | public function includeDefaultContext() |
|
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | 6 | public function getController() |
|
103 | |||
104 | /** |
||
105 | * @param string $controller |
||
106 | */ |
||
107 | public function setController($controller) |
||
111 | |||
112 | 8 | public function addContext($context) |
|
116 | |||
117 | /** @return bool */ |
||
118 | 8 | public function inheritContext() |
|
122 | } |
||
123 |