Reads headers separated into parameters consisting of an optional main value,
and subsequent name/value pairs - for example text/html; charset=utf-8.
A ParameterConsumer's parts are separated by a semi-colon. Its name/value
pairs are separated with an '=' character.
Parts may be mime-encoded entities. Additionally, a value can be quoted and
comments may exist.
- author Zaahid Bateson
Methods |
Properties |
Methods |
protected getPartForToken(string $token, bool $isLiteral) Creates and returns a \ZBateson\MailMimeParser\Header\Part\Token out of
|
protected getTokenSeparators() : array Returns semi-colon and equals char as token separators.
|
protected getTokenSplitPattern() : string Overridden to use a specialized regex for finding mime-encoded parts Some implementations seem to place mime-encoded parts within quoted
|
protected processParts(array $parts) : array Post processing involves creating Part\LiteralPart or Part\ParameterPart
|
Methods |
private addToSplitPart(ArrayObject $splitParts, string $name, string $value, int $index, bool $isEncoded) Adds the passed parameter with the given name and value to a
|
private finalizeParameterParts(ArrayObject $combined) : array Loops over parts in the passed array, creating ParameterParts out of any The method then calls filterIgnoreSpaces to filter out empty elements in
|
private getPartFor(string $strName, string $strValue, ArrayObject $splitParts) Instantiates and returns either a MimeLiteralPart if $strName is empty, If the part is a SplitParameterToken, it's added to the passed
|
private processTokenPart(string $tokenValue, ArrayObject $combined, ArrayObject $splitParts, string $strName, string $strCat) : bool Handles parameter separator tokens during final processing. If the end token is found, a new IHeaderPart is assigned to the passed Returns true if the token was processed, and false otherwise. |
Methods |