Skip to content

Commit d20e5f8

Browse files
committed
Add a note about configurable version regular expression
Correct details about the regular expression and fixing missing space in php sample code.
1 parent dc9531f commit d20e5f8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Resources/doc/format_listener.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ If you have to verify if the version is correctly catched you can use something
153153

154154
.. code-block:: php
155155
156-
if($this->container->get('fos_rest.version_listener')) {
156+
if ($this->container->get('fos_rest.version_listener')) {
157157
print $this->container->get('fos_rest.version_listener')->getVersion();
158158
}
159+
160+
Note that this version mechanism is configurable by your own by changing the regular expression in the `media type version regex configuration`_.
161+
162+
.. _`media type version regex configuration`: http://symfony.com/doc/master/bundles/FOSRestBundle/format_listener.html#media-type-version-extraction

0 commit comments

Comments
 (0)