Skip to content

Commit 5e5faeb

Browse files
committed
Formatting fixes per WouterJ's comments
1 parent 55e89b8 commit 5e5faeb

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

book/controller.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ headers and content that's sent back to the client::
727727
.. tip::
728728

729729
There are also special classes to make certain kinds of responses easier:
730+
730731
- For JSON, there is :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`.
731732
See :ref:`component-http-foundation-json-response`.
732733
- For files, there is :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`.

components/http_foundation/introduction.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ represented by a PHP callable instead of a string::
409409
.. _component-http-foundation-serving-files:
410410

411411
Serving Files
412-
~~~~~~~~~~~~~~~~~
412+
~~~~~~~~~~~~~
413413

414414
.. versionadded:: 2.1
415415
The ``makeDisposition`` method was added in Symfony 2.1.
@@ -427,7 +427,8 @@ abstracts the hard work behind a simple API::
427427
$response->headers->set('Content-Disposition', $d);
428428

429429
.. versionadded:: 2.2
430-
The :class:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse` class was added in Symfony 2.2.
430+
The :class:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse`
431+
class was added in Symfony 2.2.
431432

432433
Alternatively, if you are serving a static file, you can use a
433434
:class:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse`::
@@ -437,10 +438,9 @@ Alternatively, if you are serving a static file, you can use a
437438
$file = 'path/to/file.txt';
438439
$response = new BinaryFileResponse($file);
439440

440-
The :class:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse` will
441-
automatically handle ``Range`` and ``If-Range`` headers from the request.
442-
You can also set the ``Content-Type`` of the sent file, or change its
443-
``Content-Disposition``::
441+
The ``BinaryFileResponse`` will automatically handle ``Range`` and
442+
``If-Range`` headers from the request. You can also set the ``Content-Type``
443+
of the sent file, or change its ``Content-Disposition``::
444444

445445
$response->headers->set('Content-Type', 'text/plain')
446446
$response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'filename.txt');
@@ -464,7 +464,8 @@ right content and headers. A JSON response might look like this::
464464
$response->headers->set('Content-Type', 'application/json');
465465

466466
.. versionadded:: 2.1
467-
The :class:`Symfony\\Component\\HttpFoundation\\JsonResponse` class was added in Symfony 2.1.
467+
The :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`
468+
class was added in Symfony 2.1.
468469

469470
There is also a helpful :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`
470471
class, which can make this even easier::

0 commit comments

Comments
 (0)