Abstract Accept Header
Naming conventions:
Accept: audio/mp3; q=0.2; version=0.5, audio/basic+mp3|——————————————————| header line |——| field name
Factory method: parse Accept header string
Parameters: | string – |
---|---|
Return type: | Accept |
Parse the Field Value Parts represented by a header line
Parameters: | string – |
---|---|
Throws ExceptionInvalidArgumentException: | |
If header is invalid | |
Return type: | array |
Parse the accept params belonging to a media range
Parameters: | string – |
---|---|
Return type: | stdClass |
Parse the keys contained in the header line
Parameters: | string – |
---|---|
Return type: | array |
Get field value
Parameters: | array|null – |
---|---|
Return type: | string |
Assemble and escape the field value parameters based on RFC 2616 section 2.1
Parameters: |
|
---|---|
Return type: | string |
Add a type, with the given priority
Parameters: |
|
---|---|
Throws ExceptionInvalidArgumentException: | |
Return type: | Accept |
Does the header have the requested type?
Parameters: | array|string – |
---|---|
Return type: | bool |
Match a media string against this header
Parameters: | array|string – |
---|---|
Return type: | AcceptFieldValuePart|bool The matched value or false |
Return a match where all parameters in argument #1 match those in argument #2
Parameters: |
|
---|---|
Return type: | bool|array |
Add a key/value combination to the internal queue
Parameters: | stdClass – |
---|---|
Return type: | number |