Naming conventions:
Accept: audio/mp3; q=0.2; version=0.5, audio/basic+mp3
|------------------------------------------------------| header line
|------| field name
|-----------------------------------------------| field value
|-------------------------------| field value part
|------| type
|--| subtype
|--| format
|----| subtype
|---| format
|-------------------| parameter set
|-----------| parameter
|-----| parameter key
|--| parameter value
|---| priority
Methods
Add an encoding, with the given priority
addEncoding(string $type, int | float $priority) : \Zend\Http\Header\Accept
Parameters
$type
string
$priority
intfloat
Returns
Factory method: parse Accept header string
fromString(string $headerLine) : \Zend\Http\Header\Accept
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::fromString() |
Parameters
$headerLine
string
Exceptions
Returns
Get field name
getFieldName() : string
Get field value
getFieldValue(array | null $values) : string
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::getFieldValue() |
Parameters
$values
arraynull
Returns
string
getPrioritized()
getPrioritized() : array
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::getPrioritized() |
Returns
array
with all the keys, values and parameters this header represents:
Does the header have the requested encoding?
hasEncoding(string $type) : bool
Parameters
$type
string
Returns
bool
Match a media string against this header
match(array | string $matchAgainst) : \Zend\Http\Header\Accept\FieldValuePArt\AcceptFieldValuePart | bool
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::match() |
Parameters
$matchAgainst
arraystring
Returns
\Zend\Http\Header\Accept\FieldValuePArt\AcceptFieldValuePart
bool
The matched value or false
Cast to string
toString() : string
Returns in form of "NAME: VALUE"
Returns
string
Add a key/value combination to the internal queue
addFieldValuePartToQueue(\stdClass $value) : \Zend\Http\Header\number
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::addFieldValuePartToQueue() |
Parameters
Returns
\Zend\Http\Header\number
Add a type, with the given priority
addType(string $type, int | float $priority, array $params) : \Zend\Http\Header\Accept
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::addType() |
Parameters
$type
string
$priority
intfloat
$params
array
(optional) $params
Exceptions
Returns
Assemble and escape the field value parameters based on RFC 2616 section 2.1
assembleAcceptParam(string $value, string $key) : string
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::assembleAcceptParam() |
Parameters
$value
string
$key
string
Returns
string
Parse the keys contained in the header line
getParametersFromFieldValuePart(string $fieldValuePart) : array
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::getParametersFromFieldValuePart() |
Parameters
$fieldValuePart
string
Returns
array
Does the header have the requested type?
hasType(array | string $matchAgainst) : bool
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::hasType() |
Parameters
$matchAgainst
arraystring
Returns
bool
Return a match where all parameters in argument #1 match those in argument #2
matchAcceptParams(array $match1, array $match2) : bool | array
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::matchAcceptParams() |
Parameters
$match1
array
$match2
array
Returns
bool
array
Sort the internal Field Value Parts
sortFieldValueParts() : \Zend\Http\Header\number
Inherited
See |
sect 14.1 Media ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies to a given type, the most specific reference has precedence. For example, Accept: text/*, text/html, text/html;level=1, * /* have the following precedence: 1) text/html;level=1 2) text/html 3) text/* 4) * /* |
inherited_from |
\Zend\Http\Header\AbstractAccept::sortFieldValueParts() |
Returns
\Zend\Http\Header\number
Properties
$fieldValueParts
$fieldValueParts : \stdClass[]
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::$$fieldValueParts |
$regexAddType
$regexAddType
Determines if since last mutation the stack was sorted
$sorted : bool
Inherited
inherited_from |
\Zend\Http\Header\AbstractAccept::$$sorted |