You can find the complete (integrated) configuration or reset the router itself. It is not possible to export all the route objects, so I must disappoint you.
To get the full configuration, enter it from the service locator:
// $sl instanceof Zend\ServiceManager\ServiceManager $config = $sl->get('COnfig'); $routes = $config['router']['routes'];
If you want to view all routes for debugging purposes only, you can use var_dump or the like on the router object:
// $sl instanceof Zend\ServiceManager\ServiceManager $router = $sl->get('Router'); var_dump($router);
To get route instances, you can build routes yourself using the route plugin manager, but I'm not sure if you want to go ...
source share