Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Addes some versionadded blocks
  • Loading branch information
wouterj committed Jan 21, 2013
commit 75d6b4dd062e3790b980f3beb25d05637b9a264d
12 changes: 10 additions & 2 deletions book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ The route is simple:

return $collection;

.. versionadded:: 2.2
The ``path`` option is new in Symfony2.2, ``pattern`` is used in older
versions.

The path defined by the ``blog_show`` route acts like ``/blog/*`` where
the wildcard is given the name ``slug``. For the URL ``/blog/my-blog-post``,
the ``slug`` variable gets a value of ``my-blog-post``, which is available
Expand Down Expand Up @@ -677,6 +681,10 @@ be accomplished with the following route configuration:

return $collection;

.. versionadded::
The ``methods`` option is added in Symfony2.2. Use the ``_method``
requirement in older versions.

Despite the fact that these two routes have identical paths (``/contact``),
the first route will match only GET requests and the second route will match
only POST requests. This means that you can display the form and submit the
Expand All @@ -686,8 +694,8 @@ form via the same URL, while using distinct controllers for the two actions.

If no ``methods`` are specified, the route will match on *all* methods.

Adding a Hostname Pattern
~~~~~~~~~~~~~~~~~~~~~~~~~
Adding a Hostname
~~~~~~~~~~~~~~~~~

.. versionadded:: 2.2
Hostname matching support was added in Symfony 2.2
Expand Down