Methods

Add a parameter pair

addParameter(string $name, string $value) : \Zend\Mail\Header\ContentType

Parameters

$name

string

$value

string

Exceptions

\Zend\Mail\Header\Exception\InvalidArgumentException for parameter names that do not follow RFC 2822
\Zend\Mail\Header\Exception\InvalidArgumentException for parameter values that do not follow RFC 2822

Returns

Factory to generate a header object from a string

fromString(string $headerLine) : \Zend\Mail\Header\self

Parameters

$headerLine

string

Exceptions

\Zend\Mail\Header\Exception\InvalidArgumentException If the header does not match with RFC 2822 definition.

Returns

\Zend\Mail\Header\self

Get header encoding

getEncoding() : string

Returns

string

Retrieve header name

getFieldName() : string

Returns

string

Retrieve header value

getFieldValue(bool $format) : string

Parameters

$format

bool

Return the value in Mime::Encoded or in Raw format

Returns

string

Get a parameter by name

getParameter(string $name) : null | string

Parameters

$name

string

Returns

nullstring

Get all parameters

getParameters() : array

Returns

array

Retrieve the content type

getType() : string

Returns

string

Remove a named parameter

removeParameter(string $name) : bool

Parameters

$name

string

Returns

bool

Set header encoding

setEncoding(string $encoding) : \Zend\Mail\Header\self

Parameters

$encoding

string

Returns

\Zend\Mail\Header\self

Set the content type

setType(string $type) : \Zend\Mail\Header\ContentType

Cast to string

toString() : string

Returns in form of "NAME: VALUE"

Returns

string

 Properties

 

$parameters

$parameters : array

 

$type

$type : string

 Constants

 

Format value in Mime-Encoding if not US-ASCII encoding is used

FORMAT_ENCODED : bool
Inherited

inherited_from \Zend\Mail\Header\HeaderInterface::FORMAT_ENCODED
 

Return value with the interval ZF2 value (UTF-8 non-encoded)

FORMAT_RAW : bool
Inherited

inherited_from \Zend\Mail\Header\HeaderInterface::FORMAT_RAW