Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 804bc7c

Browse filesBrowse files
authored
[HttpFoundation] Small fixes on some examples
There were some small mistakes on "Processing HTTP Headers" section.
1 parent 332e6c4 commit 804bc7c
Copy full SHA for 804bc7c

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎components/http_foundation.rst

Copy file name to clipboardExpand all lines: components/http_foundation.rst
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,23 +262,23 @@ this complexity and defines some methods for the most common tasks::
262262
use Symfony\Component\HttpFoundation\HeaderUtils;
263263

264264
// Splits an HTTP header by one or more separators
265-
HeaderUtils::split('da, en-gb;q=0.8', ',;')
266-
// => array(array('da'), array('en-gb'), array('q', '0.8'))
265+
HeaderUtils::split('da, en-gb;q=0.8', ',;');
266+
// => array(array('da'), array('en-gb','q=0.8'))
267267

268268
// Combines an array of arrays into one associative array
269-
HeaderUtils::combine(array(array('foo', 'abc'), array('bar')))
269+
HeaderUtils::combine(array(array('foo', 'abc'), array('bar')));
270270
// => array('foo' => 'abc', 'bar' => true)
271271

272272
// Joins an associative array into a string for use in an HTTP header
273-
HeaderUtils::toString(array('foo' => 'abc', 'bar' => true, 'baz' => 'a b c'), ',')
273+
HeaderUtils::toString(array('foo' => 'abc', 'bar' => true, 'baz' => 'a b c'), ',');
274274
// => 'foo=abc, bar, baz="a b c"'
275275

276276
// Encodes a string as a quoted string, if necessary
277-
HeaderUtils::quote('foo "bar"')
278-
// => 'foo \"bar\"'
277+
HeaderUtils::quote('foo "bar"');
278+
// => '"foo \"bar\""'
279279

280280
// Decodes a quoted string
281-
HeaderUtils::unquote('foo \"bar\"')
281+
HeaderUtils::unquote('"foo \"bar\""');
282282
// => 'foo "bar"'
283283

284284
Accessing ``Accept-*`` Headers Data

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.