Represents a Content-ID, Message-ID, In-Reply-To or References header.

For a multi-id header like In-Reply-To or References, all IDs can be retrieved by calling getIds(). Otherwise, to retrieve the first (or only) ID call getValue().

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

 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

Synonym for getValue().

getId() : string | null

Returns

stringnull

Returns all IDs parsed for a multi-id header like References or In-Reply-To.

getIds() : array<mixed,string>

Returns

array<mixed,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 an IdBaseConsumer.

getConsumer(\ZBateson\MailMimeParser\Header\Consumer\ConsumerService $consumerService) : \ZBateson\MailMimeParser\Header\Consumer\AbstractConsumer
inherited_from \ZBateson\MailMimeParser\Header\GenericHeader::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