1 | <?php |
||
19 | class Route extends Base |
||
20 | { |
||
21 | /** |
||
22 | * Flag that enable the routing table. |
||
23 | * |
||
24 | * @var bool |
||
25 | */ |
||
26 | private $activated = false; |
||
27 | |||
28 | /** |
||
29 | * Store routes for path lookup. |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | private $paths = []; |
||
34 | |||
35 | /** |
||
36 | * Store routes for url lookup. |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | private $urls = []; |
||
41 | |||
42 | /** |
||
43 | * Enable routing table. |
||
44 | * |
||
45 | * @return Route |
||
46 | */ |
||
47 | public function enable() |
||
53 | |||
54 | /** |
||
55 | * Add route. |
||
56 | * |
||
57 | * @param string $path |
||
58 | * @param string $controller |
||
59 | * @param string $action |
||
60 | * @param string $plugin |
||
61 | * |
||
62 | * @return Route |
||
63 | */ |
||
64 | public function addRoute($path, $controller, $action, $plugin = '') |
||
88 | |||
89 | /** |
||
90 | * Find a route according to the given path. |
||
91 | * |
||
92 | * @param string $path |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | public function findRoute($path) |
||
129 | |||
130 | /** |
||
131 | * Find route url. |
||
132 | * |
||
133 | * @param string $controller |
||
134 | * @param string $action |
||
135 | * @param array $params |
||
136 | * @param string $plugin |
||
137 | * |
||
138 | * @return string |
||
139 | */ |
||
140 | public function findUrl($controller, $action, array $params = [], $plugin = '') |
||
169 | |||
170 | /** |
||
171 | * Load route data from cache. |
||
172 | * |
||
173 | * @param array $routes |
||
174 | */ |
||
175 | public function loadCacheData($routes) |
||
180 | |||
181 | /** |
||
182 | * Get route data. |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | public function getRouteData() |
||
193 | |||
194 | /** |
||
195 | * Find url params. |
||
196 | * |
||
197 | * @param array $items |
||
198 | * |
||
199 | * @return array |
||
200 | */ |
||
201 | public function findParams($path) |
||
207 | } |
||
208 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.