getRoutes()) . PHP_EOL; foreach($router->getRoutes() as $route) { if(isset($route['path']) && strpos($route['path'], 'roles') !== false) { echo "Found roles route: " . $route['path'] . " -> " . $route['handler'][0] . "::" . $route['handler'][1] . PHP_EOL; } } echo "All API routes:\n"; foreach($router->getRoutes() as $route) { if(isset($route['path']) && strpos($route['path'], '/api/') === 0) { echo "- " . $route['path'] . " -> " . $route['handler'][0] . "::" . $route['handler'][1] . PHP_EOL; } } echo "All routes structure:\n"; foreach($router->getRoutes() as $i => $route) { echo "Route $i: " . print_r($route, true) . PHP_EOL; }