Base class for headers composing address lists (to, from, cc, bcc, reply-to)

 Methods

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 address list managed by this header

getAddressList() : \Zend\Mail\AddressList

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

Set address list for this header

setAddressList(\Zend\Mail\AddressList $addressList) 

Parameters

$addressList

\Zend\Mail\AddressList

Set header encoding

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

Parameters

$encoding

string

Returns

\Zend\Mail\Header\self

Cast to string

toString() : string

Returns in form of "NAME: VALUE"

Returns

string

 Properties

 

$addressList

$addressList : \Zend\Mail\AddressList

 

Header encoding

$encoding : string

 

<p>Normalized field name</p>

$fieldName : string

 

<p>lower case field name</p>

$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