Manages a prioritized list of IParser objects for parsing messages and parts and creating proxied parts.
The default ParserManager sets up a MimeParser in priority 0, and a NonMimeParser in priority 1.
- author Zaahid Bateson
| Methods |
| public __construct(ZBateson |
| public createParserProxyFor(ZBateson Creates a ParserPartProxy for the passed $partBuilder using a compatible IParser. Loops through registered IParsers calling 'canParse()' on each with the passed PartBuilder, then calling either 'getParserMessageProxyFactory()' or 'getParserPartProxyFactory()' depending on if the PartBuilder has a parent, and finally calling 'newInstance' on the returned ParserPartProxyFactory passing it the IParser, and returning the new ParserPartProxy instance that was created.
|
| public prependParser(ZBateson Adds an IParser at the highest priority (up front), calling $parser->setParserManager($this) on it.
|
| public setParsers(array $parsers) : static Overrides the internal prioritized list of parses with the passed list, calling $parser->setParserManager($this) on each one.
|
| Properties |
protected array $parsers = []
|