Reads headers separated into parameters consisting of an optional main value, and subsequent name/value pairs - for example text/html; charset=utf-8.
A ParameterConsumerService's parts are separated by a semi-colon. Its name/value pairs are separated with an '=' character.
Parts may be mime-encoded entities, or RFC-2231 split/encoded parts. Additionally, a value can be quoted and comments may exist.
Actual processing of parameters is done in ParameterNameValueConsumerService, with ParameterConsumerService processing all collected parts into split parameter parts as necessary.
- author Zaahid Bateson
Methods |
public __construct(Psr\Log\LoggerInterface $logger, ZBateson |
Properties |
Methods |
protected advanceToNextToken(Iterator $tokens, bool $isStartToken) : static Disables advancing for start tokens. |
protected getTokenSplitPattern() : string Overridden to use a specialized regex for finding mime-encoded parts (RFC 2047). Some implementations seem to place mime-encoded parts within quoted parameters, and split the mime-encoded parts across multiple split parameters. The specialized regex doesn't allow double quotes inside a mime encoded part, so it can be "continued" in another parameter.
|
protected processParts(array $parts) : array Post processing involves looking for split parameter parts with matching names and combining them into a SplitParameterPart, and otherwise returning ParameterParts from ParameterNameValueConsumer as-is.
|