@@ -262,23 +262,23 @@ this complexity and defines some methods for the most common tasks::
262
262
use Symfony\Component\HttpFoundation\HeaderUtils;
263
263
264
264
// 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'))
267
267
268
268
// 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')));
270
270
// => array('foo' => 'abc', 'bar' => true)
271
271
272
272
// 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'), ',');
274
274
// => 'foo=abc, bar, baz="a b c"'
275
275
276
276
// 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\" "'
279
279
280
280
// Decodes a quoted string
281
- HeaderUtils::unquote('foo \"bar\"')
281
+ HeaderUtils::unquote('" foo \"bar\""');
282
282
// => 'foo "bar"'
283
283
284
284
Accessing ``Accept-* `` Headers Data
0 commit comments