Skip to content

Commit ee191a6

Browse files
committed
Minor tweaks
1 parent 55f4773 commit ee191a6

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

controller.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ information you need about the request.
534534
Like the ``Request``, the ``Response`` object has a public ``headers`` property.
535535
This object is of the type :class:`Symfony\\Component\\HttpFoundation\\ResponseHeaderBag`
536536
and provides methods for getting and setting response headers. The header names are
537-
normalized. As a result, the name ``Content-Type`` is equivalent to
537+
normalized. As a result, the name ``Content-Type`` is equivalent to
538538
the name ``content-type`` or ``content_type``.
539539

540540
In Symfony, a controller is required to return a ``Response`` object::
@@ -548,9 +548,10 @@ In Symfony, a controller is required to return a ``Response`` object::
548548
$response = new Response('<style> ... </style>');
549549
$response->headers->set('Content-Type', 'text/css');
550550

551-
To facilitate this, different response objects are included to address different response types.
552-
Some of these are mentioned below. To learn more about the ``Request`` and ``Response`` (and different
553-
``Response`` classes), see the :ref:`HttpFoundation component documentation <component-http-foundation-request>`.
551+
To facilitate this, different response objects are included to address different
552+
response types. Some of these are mentioned below. To learn more about the
553+
``Request`` and ``Response`` (and different ``Response`` classes), see the
554+
:ref:`HttpFoundation component documentation <component-http-foundation-request>`.
554555

555556
Returning JSON Response
556557
~~~~~~~~~~~~~~~~~~~~~~~
@@ -606,15 +607,16 @@ The ``file()`` helper provides some arguments to configure its behavior::
606607
Final Thoughts
607608
--------------
608609

609-
In Symfony, a controller is usually a class method which is used to accept requests,
610-
and return a ``Response`` object. When mapped with a url, a controller becomes accessible
611-
and its response can be viewed.
610+
In Symfony, a controller is usually a class method which is used to accept
611+
requests, and return a ``Response`` object. When mapped with a URL, a controller
612+
becomes accessible and its response can be viewed.
612613

613-
To facilitate the development of controllers, Symfony provides an ``AbstractController``. It
614-
can be used to extend the controller class allowing access to some frequently used utilities
615-
such as ``render`` and ``redirectToRoute``. The ``AbstractController`` also
616-
provides the ``createNotFoundException`` utility which is used to return a page
617-
not found response.
614+
To facilitate the development of controllers, Symfony provides an
615+
``AbstractController``. It can be used to extend the controller class allowing
616+
access to some frequently used utilities such as ``render()`` and
617+
``redirectToRoute()``. The ``AbstractController`` also provides the
618+
``createNotFoundException()`` utility which is used to return a page not found
619+
response.
618620

619621
In other articles, you'll learn how to use specific services from inside your controller
620622
that will help you persist and fetch objects from a database, process form submissions,

0 commit comments

Comments
 (0)