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.

public __construct(ZBateson\MailMimeParser\Parser\MimeParser $mimeParser, ZBateson\MailMimeParser\Parser\NonMimeParser $nonMimeParser)
public createParserProxyFor(ZBateson\MailMimeParser\Parser\PartBuilder $partBuilder)

Creates a ParserPartProxy for the passed $partBuilder using a compatible

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\MailMimeParser\Parser\IParser $parser)

Adds an IParser at the highest priority (up front), calling
$parser->setParserManager($this) on it.

public setParsers(array $parsers)

Overrides the internal prioritized list of parses with the passed list,
calling $parser->setParserManager($this) on each one.

protected $parsers
© 2023 Bruce Wells
Search Namespaces \ Classes