Represents a single mime header part token, with the possibility of it being MIME-Encoded as per RFC-2047.
MimeToken automatically decodes the value if it's encoded.
- author Zaahid Bateson
CloneableInstantiable
Constants |
public ZBateson
|
public ZBateson
|
Methods |
public __construct(Psr\Log\LoggerInterface $logger, ZBateson |
public getCharset() : ?string Returns the charset for the encoded part. |
public getLanguage() : ?string Returns the language code for the mime part. |
public getRawValue() : string |
Properties |
protected ?string $charset = NULL
|
protected ?string $language = NULL
|
Methods |
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, either replacing a mime part with its value by calling iconv_mime_decode or converts the encoding on the text part by calling convertEncoding. |
Methods |
private decodeMatchedEntity(array $matches) : string Decodes a matched mime entity part into a string and returns it, after adding the string into the languages array.
|