Skip to content

Commit c7d1d74

Browse files
committed
applied some tweaks as suggested by @javiereguiluz
1 parent 9b2e61e commit c7d1d74

File tree

5 files changed

+35
-33
lines changed

5 files changed

+35
-33
lines changed

Resources/doc/3-listener-support.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ in the response (accept listener).
1111

1212
With this in mind we now turn to explain each one of them.
1313

14-
All listeners except the ``mime_type`` one are disabled by default. You can
15-
enable one or more of these listeners. For example, below you can see how to
16-
enable all listeners:
14+
All listeners except the ``mime_type`` listener are disabled by default. You
15+
can enable one or more of these listeners. For example, below you can see how
16+
to enable a few additional listeners:
1717

1818
.. code-block:: yaml
1919
@@ -25,8 +25,8 @@ enable all listeners:
2525
view:
2626
view_response_listener: 'force'
2727
28-
3.1 View Response listener
29-
--------------------------
28+
View Response Listener
29+
----------------------
3030

3131
The view response listener makes it possible to simply return a ``View``
3232
instance from action controllers. The final output will then automatically be
@@ -36,19 +36,19 @@ This requires adding the `SensioFrameworkExtraBundle`_ to your vendors.
3636

3737
For details see :doc:`View Response Listener <view_response_listener>`.
3838

39-
3.2 Body listener
40-
-----------------
39+
Body Listener
40+
-------------
4141

4242
The Request body listener makes it possible to decode the contents of a request
43-
in order to populate the "request" parameter bag of the Request. This for
44-
example allows to receive data that normally would be sent via POST as
43+
in order to populate the "request" parameter bag of the Request. This, for
44+
example, allows to receive data that normally would be sent via POST as
4545
``application/x-www-form-urlencode`` in a different format (for example
4646
application/json) in a PUT.
4747

4848
For details see :doc:`Body Listener <body_listener>`.
4949

50-
3.3 Request Body Converter Listener
51-
-----------------------------------
50+
Request Body Converter Listener
51+
-------------------------------
5252

5353
`ParamConverters`_ are a way to populate objects and inject them as controller
5454
method arguments. The Request body converter makes it possible to deserialize
@@ -59,18 +59,18 @@ and have the converters enabled.
5959

6060
For details see :doc:`Request Body Converter Listener <request_body_converter_listener>`.
6161

62-
3.4 Format listener
63-
-------------------
62+
Format Listener
63+
---------------
6464

6565
The Request format listener attempts to determine the best format for the
66-
request based on the Request's Accept-Header and the format priority
66+
for the request based on the HTTP Accept header and the format priority
6767
configuration. This way it becomes possible to leverage Accept-Headers to
6868
determine the request format, rather than a file extension (like foo.json).
6969

7070
For details see :doc:`Format Listener <format_listener>`.
7171

72-
3.5 Mime type listener
73-
----------------------
72+
Mime Type Listener
73+
------------------
7474

7575
This listener allows registering additional mime types in the ``Request``
7676
class. It works similar to the `mime type listener`_ available in Symfony
@@ -83,16 +83,16 @@ since 2.5.
8383
view:
8484
mime_types: {'jsonp': ['application/javascript+jsonp']}
8585
86-
3.6 Param Fetcher listener
87-
--------------------------
86+
Param Fetcher Listener
87+
----------------------
8888

8989
The param fetcher listener simply sets the ParamFetcher instance as a request attribute
9090
configured for the matched controller so that the user does not need to do this manually.
9191

92-
For details see :doc:`Param Fetcher <param_fetcher_listener>`.
92+
For details see :doc:`Param Fetcher Listener <param_fetcher_listener>`.
9393

94-
3.7 Allowed Http Methods Listener
95-
---------------------------------
94+
Allowed Http Methods Listener
95+
-----------------------------
9696

9797
This listener adds the ``Allow`` HTTP header to each request appending all
9898
allowed methods for a given resource.
@@ -121,8 +121,8 @@ You need to enable this listener as follows, as it is disabled by default:
121121
fos_rest:
122122
allowed_methods_listener: true
123123
124-
3.8 Security Exception Listener
125-
-------------------------------
124+
Security Exception Listener
125+
---------------------------
126126

127127
By default it is the responsibility of firewall access points to deal with
128128
AccessDeniedExceptions. For example the ``form`` entry point will redirect to

Resources/doc/body_listener.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
3.2 Body listener
2-
=================
1+
Body Listener
2+
=============
33

44
The Request body listener makes it possible to decode the contents of a request
55
in order to populate the "request" parameter bag of the Request. This for
@@ -62,8 +62,10 @@ existing array key. For example ``foo_bar`` and ``foo_Bar`` will both lead to
6262
BadRequestHttpException with the message ``The key "foo_Bar" is invalid as it
6363
will override the existing key "fooBar"``.
6464

65-
NB: If you use the ``camel_keys`` normalizer, you must be careful when choosing
66-
your form name.
65+
.. note::
66+
67+
If you use the ``camel_keys`` normalizer, you must be careful when choosing
68+
your form name.
6769

6870
You can also create your own array normalizer by implementing the
6971
``FOS\RestBundle\Normalizer\ArrayNormalizerInterface``.

Resources/doc/format_listener.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
3.4 Format listener
2-
===================
1+
Format Listener
2+
===============
33

44
The Request format listener attempts to determine the best format for the
55
request based on the Request's Accept-Header and the format priority

Resources/doc/param_fetcher_listener.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
3.6 Param Fetcher listener
2-
==========================
1+
Param Fetcher Listener
2+
======================
33

44
The param fetcher listener simply sets the ParamFetcher instance as a request attribute
55
configured for the matched controller so that the user does not need to do this manually.

Resources/doc/request_body_converter_listener.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
3.3 Request Body Converter Listener
2-
===================================
1+
Request Body Converter Listener
2+
===============================
33

44
`ParamConverters`_ are a way to populate objects and inject them as controller
55
method arguments. The Request body converter makes it possible to deserialize

0 commit comments

Comments
 (0)