MailMimeParser 2.0

MimeEncodedHeader extends AbstractHeader
in package

Allows a header to be mime-encoded and be decoded with a consumer after decoding.

The entire header's value must only consist of mime-encoded parts for this to apply.

Tags
author

Zaahid Bateson

Table of Contents

$mimeLiteralPartFactory  : MimeLiteralPartFactory
$name  : string
$parts  : array<string|int, IHeaderPart>
$rawValue  : string
__construct()  : mixed
Assigns the header's name and raw value, then calls getConsumer and setParseHeaderValue to extract a parsed value.
__toString()  : string
Returns the string representation of the header.
getName()  : string
Returns the name of the header.
getParts()  : array<string|int, IHeaderPart>
Returns an array of IHeaderPart objects the header's value has been parsed into.
getRawValue()  : string
Returns the raw value of the header.
getValue()  : string
Returns the parsed 'value' of the header.
getConsumer()  : AbstractConsumer
Returns the header's Consumer
setParseHeaderValue()  : mixed
Mime-decodes the raw value if the whole raw value only consists of mime- encoded parts and whitespace prior to invoking the passed consumer.

Properties

Methods

__construct()

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

public __construct(MimeLiteralPartFactory $mimeLiteralPartFactory, ConsumerService $consumerService, mixed $name, mixed $value) : mixed
Parameters
$mimeLiteralPartFactory : MimeLiteralPartFactory
$consumerService : ConsumerService

For parsing the value.

$name : mixed

Name of the header.

$value : mixed

Value of the header.

Return values
mixed

__toString()

Returns the string representation of the header.

public __toString() : string

i.e.: ': '

Return values
string

The string representation.

getName()

Returns the name of the header.

public getName() : string
Return values
string

The name.

getParts()

Returns an array of IHeaderPart objects the header's value has been parsed into.

public getParts() : array<string|int, IHeaderPart>
Return values
array<string|int, IHeaderPart>

The array of parts.

getRawValue()

Returns the raw value of the header.

public getRawValue() : string
Return values
string

The raw value.

getValue()

Returns the parsed 'value' of the header.

public getValue() : string

For headers that contain multiple parts, like address headers (To, From) or parameter headers (Content-Type), the 'value' is the value of the first parsed part.

Return values
string

The value

setParseHeaderValue()

Mime-decodes the raw value if the whole raw value only consists of mime- encoded parts and whitespace prior to invoking the passed consumer.

protected setParseHeaderValue(AbstractConsumer $consumer) : mixed
Parameters
$consumer : AbstractConsumer
Return values
mixed

Search results