1 | <?php namespace Limoncello\Core\Routing; |
||
31 | class Route implements RouteInterface |
||
32 | { |
||
33 | use CallableTrait, UriTrait, HasConfiguratorsTrait, HasMiddlewareTrait, HasRequestFactoryTrait; |
||
34 | |||
35 | /** |
||
36 | * @var GroupInterface |
||
37 | */ |
||
38 | private $group; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $method; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | private $uriPath; |
||
49 | |||
50 | /** |
||
51 | * @var callable |
||
52 | */ |
||
53 | private $handler; |
||
54 | |||
55 | /** |
||
56 | * @var bool |
||
57 | */ |
||
58 | private $isGroupRequestFactory = true; |
||
59 | |||
60 | /** |
||
61 | * @var string|null |
||
62 | */ |
||
63 | private $name; |
||
64 | |||
65 | /** |
||
66 | * @param GroupInterface $group |
||
67 | * @param string $method |
||
68 | * @param string $uriPath |
||
69 | */ |
||
70 | 17 | public function __construct(GroupInterface $group, $method, $uriPath) |
|
76 | |||
77 | /** |
||
78 | * @param callable $handler |
||
79 | * |
||
80 | * @return $this |
||
81 | */ |
||
82 | 14 | public function setHandler(callable $handler) |
|
91 | |||
92 | /** |
||
93 | * @param string|null $name |
||
94 | * |
||
95 | * @return $this |
||
96 | */ |
||
97 | 13 | public function setName($name) |
|
103 | |||
104 | /** |
||
105 | * @inheritdoc |
||
106 | */ |
||
107 | 13 | public function getGroup() |
|
111 | |||
112 | /** |
||
113 | * @inheritdoc |
||
114 | */ |
||
115 | 12 | public function getMethod() |
|
119 | |||
120 | /** |
||
121 | * @inheritdoc |
||
122 | */ |
||
123 | 13 | public function getUriPath() |
|
129 | |||
130 | /** |
||
131 | * @inheritdoc |
||
132 | */ |
||
133 | 12 | public function getMiddleware() |
|
137 | |||
138 | /** |
||
139 | * @inheritdoc |
||
140 | */ |
||
141 | 12 | public function getHandler() |
|
145 | |||
146 | /** |
||
147 | * @inheritdoc |
||
148 | */ |
||
149 | 12 | public function getContainerConfigurators() |
|
153 | |||
154 | /** |
||
155 | * @inheritdoc |
||
156 | */ |
||
157 | 12 | public function getRequestFactory() |
|
165 | |||
166 | /** |
||
167 | * @return bool |
||
168 | */ |
||
169 | 12 | public function isUseGroupRequestFactory() |
|
173 | |||
174 | /** |
||
175 | * @param bool $isGroupFactory |
||
176 | * |
||
177 | * @return $this |
||
178 | */ |
||
179 | 17 | public function setUseGroupRequestFactory($isGroupFactory) |
|
185 | |||
186 | /** |
||
187 | * @inheritdoc |
||
188 | */ |
||
189 | 11 | public function getName() |
|
195 | } |
||
196 |