Reads the header using a SubjectConsumer.

The base class sets up the header's consumer, sets the name of the header and calls the consumer to parse the header's value.

AbstractHeader::getConsumer is an abstract method that must be overridden to return an appropriate Consumer\AbstractConsumer type.

author Zaahid Bateson
package MailMimeParser
inherited_from \ZBateson\MailMimeParser\Header\AbstractHeader

 Methods

Assigns the header's name and raw value, then calls getConsumer and setParseHeaderValue to extract a parsed value.

__construct(\ZBateson\MailMimeParser\Header\Consumer\ConsumerService $consumerService, string $name, string $value) 
Inherited

Parameters

$consumerService

\ZBateson\MailMimeParser\Header\Consumer\ConsumerService

$name

string

$value

string

Returns the string representation of the header. At the moment this is just in the form of:

__toString() : string
Inherited
: No additional processing is performed (for instance to wrap long lines.)

Returns

string

Returns the name of the header.

getName() : string
Inherited

Returns

string

Returns an array of HeaderPart objects associated with this header.

getParts() : array<mixed,\ZBateson\MailMimeParser\Header\Part\HeaderPart>
Inherited

Returns

array<mixed,\ZBateson\MailMimeParser\Header\Part\HeaderPart>

Returns the raw value of the header prior to any processing.

getRawValue() : string
Inherited

Returns

string

Returns the parsed value of the header -- calls getValue on $this->part

getValue() : string
Inherited

Returns

string

Returns a SubjectConsumer.

getConsumer(\ZBateson\MailMimeParser\Header\Consumer\ConsumerService $consumerService) : \ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer
inherited_from \ZBateson\MailMimeParser\Header\AbstractHeader::getConsumer()

Parameters

$consumerService

\ZBateson\MailMimeParser\Header\Consumer\ConsumerService

Returns

\ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer

Returns the header's Consumer

getConsumer(\ZBateson\MailMimeParser\Header\Consumer\ConsumerService $consumerService) : \ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer
Inherited

Parameters

$consumerService

\ZBateson\MailMimeParser\Header\Consumer\ConsumerService

Returns

\ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer

Calls the consumer and assigns the parsed parts to member variables.

setParseHeaderValue(\ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer $consumer) 
Inherited

The default implementation assigns the returned value to $this->part.

Parameters

$consumer

\ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer

 Properties

 

the name of the header

$name : string

Default

 

the header's parts (as returned from the consumer)

$parts : array<mixed,\ZBateson\MailMimeParser\Header\Part\HeaderPart>

Default

 

the raw value

$rawValue : string

Default