\Symfony\Component\HttpFoundationAcceptHeaderItem

Represents an Accept-* header item.

Summary

Methods
Properties
Constants
__construct()
fromString()
__toString()
setValue()
getValue()
setQuality()
getQuality()
setIndex()
getIndex()
hasAttribute()
getAttribute()
getAttributes()
setAttribute()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$value
$quality
$index
$attributes
N/A

Properties

$value

$value : string

Type

string

$quality

$quality : float

Type

float

$index

$index : integer

Type

integer

$attributes

$attributes : array

Type

array

Methods

__construct()

__construct(string  $value, array  $attributes = array()) 

Constructor.

Parameters

string $value
array $attributes

__toString()

__toString() : string

Returns header value's string representation.

Returns

string

getValue()

getValue() : string

Returns the item value.

Returns

string

getQuality()

getQuality() : float

Returns the item quality.

Returns

float

getIndex()

getIndex() : integer

Returns the item index.

Returns

integer

hasAttribute()

hasAttribute(string  $name) : boolean

Tests if an attribute exists.

Parameters

string $name

Returns

boolean

getAttribute()

getAttribute(string  $name, mixed  $default = null) : mixed

Returns an attribute by its name.

Parameters

string $name
mixed $default

Returns

mixed

getAttributes()

getAttributes() : array

Returns all attributes.

Returns

array