Class AbstractAccept

Summary

Fully Qualified Name: Zend\Http\Header\AbstractAccept
Implements: HeaderInterface

Description

Abstract Accept Header

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

Name Description Defined By
fromString() Factory method: parse Accept header string AbstractAccept
getFieldValue() Get field value AbstractAccept
getFieldValuePartsFromHeaderLine() Parse the Field Value Parts represented by a header line AbstractAccept
getPrioritized() AbstractAccept
match() Match a media string against this header AbstractAccept
parseHeaderLine() Parse a full header line or just the field value part. AbstractAccept

Method Details

fromString()

Factory method: parse Accept header string

Parameter Name Type Description
$headerLine string

Returns: \Accept

getFieldValue()

Get field value

Parameter Name Type Description
$values array|null

Returns: string

getFieldValuePartsFromHeaderLine()

Parse the Field Value Parts represented by a header line

Parameter Name Type Description
$headerLine string

Returns: array

getPrioritized()

Returns: array with all the keys, values and parameters this header represents:

match()

Match a media string against this header

Parameter Name Type Description
$matchAgainst array|string

Returns: \Accept\FieldValuePArt\AcceptFieldValuePart|bool The matched value or false

parseHeaderLine()

Parse a full header line or just the field value part.

Parameter Name Type Description
$headerLine string

Returns:

Top