Skip to content

Commit d33c890

Browse files
committed
Merge pull request #1720 from richardmiller/adding_info_on_router_match
Adding info on router:match command
2 parents a9db208 + 8d52a7f commit d33c890

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

book/routing.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,17 @@ the route name after the command:
10521052
10531053
$ php app/console router:debug article_show
10541054
1055+
.. versionadded:: 2.1
1056+
The ``router:match`` command was added in Symfony 2.1
1057+
1058+
You can check which, if any, route matches a path with the ``router:match``
1059+
console command:
1060+
1061+
.. code-block:: bash
1062+
1063+
$ php app/console router:match /articles/en/2012/article.rss
1064+
Route "article_show" matches
1065+
10551066
.. index::
10561067
single: Routing; Generating URLs
10571068

@@ -1123,9 +1134,9 @@ method:
11231134
on server information supplied by PHP. When generating absolute URLs for
11241135
scripts run from the command line, you'll need to manually set the desired
11251136
host on the ``RequestContext`` object:
1126-
1137+
11271138
.. code-block:: php
1128-
1139+
11291140
$router->getContext()->setHost('www.example.com');
11301141
11311142
.. index::

0 commit comments

Comments
 (0)