These are chat archives for ppi/framework

4th
Jun 2016
Ross Moroney
@code-ph0y
Jun 04 2016 08:05
Anyone now an easy way to get every route in the system?
without using Symfony Yaml
?
know*
Paul Dragoonis
@dragoonis
Jun 04 2016 09:29
@code-ph0y the 'routing' service is an instance of ChainRouter
from there you can interate each child router and get all of its routes out
Look at the base class, in SymfonyCMF namespace.
Gotta go! Bye!
Ross Moroney
@code-ph0y
Jun 04 2016 09:31
thanks man!
much appreciated
Ross Moroney
@code-ph0y
Jun 04 2016 09:58
    $collection = $this->getService('router')->getRouteCollection();
    $allRoutes = $collection->all();
    $routes = array_keys($allRoutes);
for future reference if anyones looking for this solution
Paul Dragoonis
@dragoonis
Jun 04 2016 10:44
We have a framework Command that is routes:debug that is now broken. The code you posted is close to what it needs to be patched with. Can you give it a bash ?
@code-ph0y
Ross Moroney
@code-ph0y
Jun 04 2016 12:14
@dragoonis what branch you working from?
Paul Dragoonis
@dragoonis
Jun 04 2016 14:10
@code-ph0y support/2.1