Skip to content

class Athena::Framework::Commands::DebugRouterMatch
inherits Athena::Console::Command #

Similar to ATH::Commands::DebugRouter, but instead of providing the route name, you provide the request path in order to determine which, if any, route that path maps to.

$ ./bin/console debug:router:match /user/10
 [OK] Route 'example_controller_user' matches

+--------------+-------------------------------------+
| Property     | Value                               |
+--------------+-------------------------------------+
| Route Name   | example_controller_user             |
| Path         | /user/{id}                          |
| Path Regex   | ^/user/(?P<id>\d+)$                 |
| Host         | ANY                                 |
| Host Regex   |                                     |
| Scheme       | ANY                                 |
| Methods      | GET                                 |
| Requirements | id: \d+                             |
| Class        | Athena::Routing::Route              |
| Defaults     | _controller: ExampleController#user |
+--------------+-------------------------------------+

Or if the route only partially matches:

$ ./bin/console debug:router:match /user/foo
 Route 'example_controller_user' almost matches but requirement for 'id' does not match (\d+)

 [ERROR] None of the routes match the path '/user/foo'

Constructors#

.new(router : ART::RouterInterface)#

View source