AcceptHeader
class AcceptHeader
Represents an Accept-* header.
An accept header is compound with a list of items, sorted by descending quality.
Methods
__construct(array $items)
No description
static AcceptHeader
fromString(string $headerValue)
Builds an AcceptHeader instance from a string.
string
__toString()
Returns header value's string representation.
bool
has(string $value)
Tests if header has given value.
AcceptHeaderItem|null
get(string $value)
Returns given value's item, if exists.
$this
all()
Returns all items.
filter(string $pattern)
Filters items on their value using given regex.
AcceptHeaderItem|null
first()
Returns first item.