Alf Eaton
Alf Eaton

Reputation: 5463

Is it possible to get the controller name in the output of Symfony2's router:debug command?

The Symfony2 console command router:debug produces a list of all the currently configured routes, including the name, HTTP method and pattern for each route.

Is it possible to also get the controller for each route in this list, without resorting to using router:debug [name] for each route and parsing out the controller from the "Defaults _controller:" line?

Upvotes: 1

Views: 120

Answers (1)

Alf Eaton
Alf Eaton

Reputation: 5463

Examining the RouterDebugCommand class showed that this wasn't possible, so I made a change to the outputRoutes method: https://gist.github.com/3380250

Upvotes: 2

Related Questions