package Default

 Methods

Constructor

__construct(string $fieldName = null, string $fieldValue = null

Parameters

$fieldName

string

Optional

$fieldValue

string

Optional

Factory to generate a header object from a string

fromString(string $headerLine) 
Static
inherited_from \Zend\Mail\Header\HeaderInterface::fromString()

Parameters

$headerLine

Get header encoding

getEncoding() 
inherited_from \Zend\Mail\Header\HeaderInterface::getEncoding()

Retrieve header name

getFieldName() 
inherited_from \Zend\Mail\Header\HeaderInterface::getFieldName()

Retrieve header value

getFieldValue(boolean $format = \Zend\Mail\Header\HeaderInterface::FORMAT_RAW
inherited_from \Zend\Mail\Header\HeaderInterface::getFieldValue()

Parameters

$format

Set header encoding

setEncoding(string $encoding) 
inherited_from \Zend\Mail\Header\HeaderInterface::setEncoding()

Parameters

$encoding

Set header name

setFieldName(string $fieldName) : \Zend\Mail\Header\GenericHeader

Parameters

$fieldName

string

Exceptions

\Zend\Mail\Header\Exception\InvalidArgumentException;

Returns

\Zend\Mail\Header\GenericHeader

Set header value

setFieldValue(string $fieldValue) : \Zend\Mail\Header\GenericHeader

Parameters

$fieldValue

string

Exceptions

\Zend\Mail\Header\Exception\InvalidArgumentException;

Returns

\Zend\Mail\Header\GenericHeader

Splits the header line in `name` and `value` parts.

splitHeaderLine(string $headerLine) : array<mixed,string>
Static

Parameters

$headerLine

string

Exceptions

\Zend\Mail\Header\Exception\InvalidArgumentException If header does not match with the format ``name:value``

Returns

array<mixed,string>`name` in the first index and `value` in the second.

Cast to string

toString() 

Returns in form of "NAME: VALUE"

inherited_from \Zend\Mail\Header\HeaderInterface::toString()

 Properties

 

Header encoding

$encoding : null | string

Default

 

$fieldName

$fieldName : string

Default

null
 

$fieldValue

$fieldValue : string

Default

null