Class ContentType

Summary

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

Description

Methods

Name Description Defined By
__construct() ContentType
fromString() Factory method: create an object from a string representation ContentType
getCharset() Get the content-type character set encoding, if any ContentType
getFieldName() Get the field name ContentType
getFieldValue() Get the field value ContentType
getMediaType() Get the media type ContentType
getParameters() Get any additional content-type parameters currently set ContentType
match() Determine if the mediatype value in this header matches the provided criteria ContentType
setCharset() Set the content-type character set encoding ContentType
setMediaType() Set the media type ContentType
setParameters() Set additional content-type parameters ContentType
toString() Create a string representation of the header ContentType

Method Details

__construct()

Parameter Name Type Description
$value
$mediaType

Returns: void

fromString()

Factory method: create an object from a string representation

Parameter Name Type Description
$headerLine string

Returns: self

getCharset()

Get the content-type character set encoding, if any

Returns: null|string

getFieldName()

Get the field name

Returns: string

getFieldValue()

Get the field value

Returns: string

getMediaType()

Get the media type

Returns: string

getParameters()

Get any additional content-type parameters currently set

Returns: array

match()

Determine if the mediatype value in this header matches the provided criteria

Parameter Name Type Description
$matchAgainst array|string

Returns: string|bool Matched value or false

setCharset()

Set the content-type character set encoding

Parameter Name Type Description
$charset string

Returns: self

setMediaType()

Set the media type

Parameter Name Type Description
$mediaType string

Returns: self

setParameters()

Set additional content-type parameters

Parameter Name Type Description
$parameters array

Returns: self

toString()

Create a string representation of the header

Returns: string

Top