Zend\Http\Header\AbstractAccept
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
- Author: Dolf Schimmel - Freeaqingme
Synopsis
class AbstractAccept
implements
HeaderInterface
{
- // members
- protected array $fieldValueParts;
- protected $regexAddType;
- protected bool $sorted;
- // methods
- public void parseHeaderLine()
- public static Accept fromString()
- public array getFieldValuePartsFromHeaderLine()
- protected stdClass parseFieldValuePart()
- protected array getParametersFromFieldValuePart()
- public string getFieldValue()
- protected string assembleAcceptParam()
- protected Accept addType()
- protected bool hasType()
- public AcceptFieldValuePart|bool match()
- protected bool|array matchAcceptParams()
- protected number addFieldValuePartToQueue()
- protected number sortFieldValueParts()
- public array getPrioritized()
Hierarchy
Extended by
- Zend\Http\Header\AcceptEncoding
- Zend\Http\Header\AcceptCharset
- Zend\Http\Header\AcceptLanguage
- Zend\Http\Header\Accept
Implements
Tasks
Line | Task |
---|---|
218+ | someone should review this thoroughly |
Members
protected
- $fieldValueParts — array
- $regexAddType
- $sorted
—
Zend\Http\Header\bool
Determines if since last mutation the stack was sorted
Methods
protected
- addFieldValuePartToQueue() — Add a key/value combination to the internal queue
- addType() — Add a type, with the given priority
- assembleAcceptParam() — Assemble and escape the field value parameters based on RFC 2616 section 2.1
- getParametersFromFieldValuePart() — Parse the keys contained in the header line
- hasType() — Does the header have the requested type?
- matchAcceptParams() — Return a match where all parameters in argument #1 match those in argument #2
- parseFieldValuePart() — Parse the accept params belonging to a media range
- sortFieldValueParts() — Sort the internal Field Value Parts
public
- fromString() — Factory method: parse Accept header string
- getFieldValue() — Get field value
- getFieldValuePartsFromHeaderLine() — Parse the Field Value Parts represented by a header line
- getPrioritized()
- match() — Match a media string against this header
- parseHeaderLine() — Parse a full header line or just the field value part.