'controller' =>
$router->
controllerName(),
'method' =>
$router->
methodName(),
'paramCount' =>
count($router->
params()),
'truePCount' =>
count($params),
'params' =>
$params,
],
];
// Defined Routes
$routes =
[];
$definedRouteCollector =
new DefinedRouteCollector($rawRoutes);
foreach ($definedRouteCollector->
collect() as $route) { // filter for strings, as callbacks aren't displayable
if ($route['handler'
] !== '(Closure)'
) { $routes[] =
[ 'method' =>
strtoupper($route['method'
]),
'route' =>
$route['route'
],
'handler' =>
$route['handler'
],
];
} }