Class AcceptLanguage

Summary

Fully Qualified Name: Zend\Http\Header\AcceptLanguage
Extends: AbstractAccept

Description

Accept Language Header

Methods

Name Description Defined By
addLanguage() Add a language, with the given priority AcceptLanguage
fromString() Factory method: parse Accept header string AbstractAccept
getFieldName() Get field name AcceptLanguage
getFieldValue() Get field value AbstractAccept
getFieldValuePartsFromHeaderLine() Parse the Field Value Parts represented by a header line AbstractAccept
getPrioritized() AbstractAccept
hasLanguage() Does the header have the requested language? AcceptLanguage
match() Match a media string against this header AbstractAccept
parseHeaderLine() Parse a full header line or just the field value part. AbstractAccept
toString() Cast to string AcceptLanguage

Method Details

addLanguage()

Add a language, with the given priority

Parameter Name Type Description
$type string
$priority int|float

Returns: \Accept

fromString()

Factory method: parse Accept header string

Parameter Name Type Description
$headerLine string

Returns: \Accept

getFieldName()

Get field name

Returns: string

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:

hasLanguage()

Does the header have the requested language?

Parameter Name Type Description
$type string

Returns: bool

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:

toString()

Cast to string

Returns: string

Top