-
-
Save pguso/e92a0769e5c1636eb8b3 to your computer and use it in GitHub Desktop.
Revisions
-
Dave Marshall created this gist
Jun 6, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/usr/bin/env php <?php # bin/routes $app = require __DIR__ . '/../app/bootstrap.php'; $routes = $app['routes']->all(); foreach($routes as $route) { $cr = new ReflectionFunction($route->getDefault('_controller')); echo sprintf("%s %s => %s@%d\n", $route->getRequirement('_method'), $route->getPattern(), str_replace(dirname(__DIR__) . '/', '', $cr->getFileName()), $cr->getStartLine() ); }