Represents a single mime header part token, with the possibility of it being
MIME-Encoded as per RFC-2047.
MimeLiteralPart automatically decodes the value if it's encoded.
- author Zaahid Bateson
Constants |
public ZBateson
|
public ZBateson
|
Methods |
public __construct(ZBateson Decoding the passed token value if it's mime-encoded and assigns the
|
public getLanguageArray() Returns an array of parts mapped to languages in the header value, for 'Hello and =?UTF-8fr-be?Q?bonjour_?= =?UTF-8it?Q?mi amici?=. Welcome!' Would be mapped in the returned array as follows:
|
public ignoreSpacesAfter() : bool Returns true if spaces before this part should be ignored. Overridden to return $this->canIgnoreSpacesAfter which is setup in the |
public ignoreSpacesBefore() : bool Returns true if spaces before this part should be ignored. Overridden to return $this->canIgnoreSpacesBefore which is setup in the |
Properties |
protected $canIgnoreSpacesAfter = false
|
protected $canIgnoreSpacesBefore = false
|
protected $languages = []
|
Methods |
protected addToLanguage(string $part, ?string $language = NULL) : self Adds the passed part into the languages array with the given language. |
protected decodeMime(string $value) : string Finds and replaces mime parts with their values. The method splits the token value into an array on mime-part-patterns, |
Methods |
private decodeMatchedEntity(array $matches) : string Decodes a matched mime entity part into a string and returns it, after
|
private decodeSplitPart(string $entity) : string Decodes a single mime-encoded entity. Unfortunately, mb_decode_header fails for many charsets on PHP 5.4 and Parsing out the charset and body of the encoded entity seems to be the |