\Symfony\Component\HttpFoundationAcceptHeader

Represents an Accept-* header.

An accept header is compound with a list of items, sorted by descending quality.

Summary

Methods
Properties
Constants
__construct()
fromString()
__toString()
has()
get()
add()
all()
filter()
first()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
sort()
$items
$sorted
N/A

Properties

$sorted

$sorted : boolean

Type

boolean

Methods

fromString()

fromString(string  $headerValue) : self

Builds an AcceptHeader instance from a string.

Parameters

string $headerValue

Returns

self

__toString()

__toString() : string

Returns header value's string representation.

Returns

string

has()

has(string  $value) : boolean

Tests if header has given value.

Parameters

string $value

Returns

boolean

filter()

filter(string  $pattern) : self

Filters items on their value using given regex.

Parameters

string $pattern

Returns

self

sort()

sort() 

Sorts items by descending quality.