class AcceptHeaderItem
Represents an Accept-* header item.
__construct(string $value, array $attributes = array()) | ||
static AcceptHeaderItem | fromString(string $itemValue) Builds an AcceptHeaderInstance instance from a string. | |
string | __toString() Returns header value's string representation. | |
$this | setValue(string $value) Set the item value. | |
string | getValue() Returns the item value. | |
$this | setQuality(float $quality) Set the item quality. | |
float | getQuality() Returns the item quality. | |
$this | setIndex(int $index) Set the item index. | |
int | getIndex() Returns the item index. | |
bool | hasAttribute(string $name) Tests if an attribute exists. | |
mixed | getAttribute(string $name, mixed $default = null) Returns an attribute by its name. | |
array | getAttributes() Returns all attributes. | |
$this | setAttribute(string $name, string $value) Set an attribute. |
string | $value | |
array | $attributes |
Builds an AcceptHeaderInstance instance from a string.
string | $itemValue |
AcceptHeaderItem |
Returns header value's string representation.
string |
Set the item value.
string | $value |
$this |
Returns the item value.
string |
Set the item quality.
float | $quality |
$this |
Returns the item quality.
float |
Set the item index.
int | $index |
$this |
Returns the item index.
int |
Tests if an attribute exists.
string | $name |
bool |
Returns an attribute by its name.
string | $name | |
mixed | $default |
mixed |
Returns all attributes.
array |
Set an attribute.
string | $name | |
string | $value |
$this |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpFoundation/AcceptHeaderItem.html