1 | <?php namespace Arcanedev\RouteViewer\Entities; |
||
14 | class RouteCollection extends Collection |
||
15 | { |
||
16 | /* ----------------------------------------------------------------- |
||
17 | | Main Methods |
||
18 | | ----------------------------------------------------------------- |
||
19 | */ |
||
20 | |||
21 | /** |
||
22 | * Load the routes. |
||
23 | * |
||
24 | * @param array $routes |
||
25 | * @param array $excludedUris |
||
26 | * @param array $excludedMethods |
||
27 | * @param array $methodColors |
||
28 | * |
||
29 | * @return self |
||
30 | */ |
||
31 | public static function load( |
||
49 | |||
50 | /* ----------------------------------------------------------------- |
||
51 | | Other Methods |
||
52 | | ----------------------------------------------------------------- |
||
53 | */ |
||
54 | |||
55 | /** |
||
56 | * Prepare route methods. |
||
57 | * |
||
58 | * @param \Illuminate\Routing\Route $route |
||
59 | * @param array $excluded |
||
60 | * @param array $colors |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | private static function prepareMethods(IlluminateRoute $route, array $excluded, array $colors) |
||
73 | |||
74 | /** |
||
75 | * Prepare route middleware. |
||
76 | * |
||
77 | * @param \Illuminate\Routing\Route $route |
||
78 | * |
||
79 | * @return array |
||
80 | */ |
||
81 | private static function prepareMiddleware(IlluminateRoute $route) |
||
87 | |||
88 | /** |
||
89 | * Gather all the route middleware. |
||
90 | * |
||
91 | * @param \Illuminate\Routing\Route $route |
||
92 | * |
||
93 | * @return array |
||
94 | */ |
||
95 | private static function gatherMiddleware(IlluminateRoute $route) |
||
104 | } |
||
105 |
Let’s assume you have a class which uses late-static binding:
}
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()
on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClass
to useself
instead: