Skip to content

Commit 99a239c

Browse files
committed
[#1868] Tweaks to new AcceptHeader docs
1 parent 6374c39 commit 99a239c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

components/http_foundation/introduction.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,21 +218,23 @@ Accessing `Accept-*` Headers Data
218218
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
219219

220220
You can easily access basic data extracted from ``Accept-*`` headers
221-
by using following methods:
221+
by using the following methods:
222222

223223
* :method:`Symfony\\Component\\HttpFoundation\\Request::getAcceptableContentTypes`:
224-
Returns the list of accepted content types ordered by descending quality;
224+
returns the list of accepted content types ordered by descending quality;
225225

226226
* :method:`Symfony\\Component\\HttpFoundation\\Request::getLanguages`:
227-
Returns the list of accepted languages ordered by descending quality;
227+
returns the list of accepted languages ordered by descending quality;
228228

229229
* :method:`Symfony\\Component\\HttpFoundation\\Request::getCharsets`:
230-
Returns the list of accepted languages ordered by descending quality;
230+
returns the list of accepted languages ordered by descending quality;
231231

232-
If you need to egt full access to parsed data from ``Accept``, ``Accept-Language``,
232+
If you need to get full access to parsed data from ``Accept``, ``Accept-Language``,
233233
``Accept-Charset`` or ``Accept-Encoding``, you can use
234234
:class:`Symfony\\Component\\HttpFoundation\\AcceptHeader` utility class::
235235

236+
use Symfony\Component\HttpFoundation\AcceptHeader;
237+
236238
$accept = AcceptHeader::fromString($request->headers->get('Accept'));
237239
if ($accept->has('text/html') {
238240
$item = $accept->get('html');

0 commit comments

Comments
 (0)