MailMimeParser 2.4

NonMimeParser extends AbstractParser
in package

Parses content for non-mime messages and uu-encoded child parts.

Tags
author

Zaahid Bateson

Table of Contents

$parserManager  : ParserManager
$parserMessageProxyFactory  : ParserPartProxyFactory
$parserPartProxyFactory  : ParserPartProxyFactory
$partBuilderFactory  : PartBuilderFactory
$partHeaderContainerFactory  : UUEncodedPartHeaderContainerFactory
__construct()  : mixed
canParse()  : bool
Always returns true, and should therefore be the last parser reached by a ParserManager.
getParserMessageProxyFactory()  : ParserPartProxyFactory
Returns the ParserPartProxyFactory responsible for creating IMessage parts for this parser.
getParserPartProxyFactory()  : ParserPartProxyFactory
Returns the ParserPartProxyFactory responsible for creating IMessagePart parts for this parser.
parseContent()  : static
parseNextChild()  : mixed
setParserManager()  : static
Sets up the passed ParserManager as the ParserManager for this part, which should be used when a new part is created (after its headers are read and a PartBuilder is created from it.)
createPart()  : ParserPartProxy
Creates a UUEncodedPartHeaderContainer attached to a PartBuilder, and calls $this->parserManager->createParserProxyFor().
parseNextPart()  : self
Reads content from the passed ParserPartProxy's stream till a uu-encoded 'begin' line is found, setting $proxy->setStreamPartContentAndEndPos() to the last byte read before the begin line.

Properties

$parserManager

protected ParserManager $parserManager

the ParserManager, which should call setParserManager when the parser is added.

$parserMessageProxyFactory

protected ParserPartProxyFactory $parserMessageProxyFactory

the parser's message proxy factory service responsible for creating an IMessage part wrapped in a ParserPartProxy.

$parserPartProxyFactory

protected ParserPartProxyFactory $parserPartProxyFactory

the parser's part proxy factory service responsible for creating IMessagePart parts wrapped in a ParserPartProxy.

Methods

__construct()

public __construct(ParserNonMimeMessageProxyFactory $parserNonMimeMessageProxyFactory, ParserUUEncodedPartProxyFactory $parserUuEncodedPartProxyFactory, PartBuilderFactory $partBuilderFactory, UUEncodedPartHeaderContainerFactory $uuEncodedPartHeaderContainerFactory) : mixed
Parameters
$parserNonMimeMessageProxyFactory : ParserNonMimeMessageProxyFactory
$parserUuEncodedPartProxyFactory : ParserUUEncodedPartProxyFactory
$partBuilderFactory : PartBuilderFactory
$uuEncodedPartHeaderContainerFactory : UUEncodedPartHeaderContainerFactory
Return values
mixed

canParse()

Always returns true, and should therefore be the last parser reached by a ParserManager.

public canParse(PartBuilder $part) : bool
Parameters
$part : PartBuilder
Return values
bool

getParserMessageProxyFactory()

Returns the ParserPartProxyFactory responsible for creating IMessage parts for this parser.

public getParserMessageProxyFactory() : ParserPartProxyFactory

This is called by ParserManager after 'canParse' if it returns true so a ParserPartProxy can be created out of the PartBuilder.

Return values
ParserPartProxyFactory

getParserPartProxyFactory()

Returns the ParserPartProxyFactory responsible for creating IMessagePart parts for this parser.

public getParserPartProxyFactory() : ParserPartProxyFactory

This is called by ParserManager after 'canParse' if it returns true so a ParserPartProxy can be created out of the PartBuilder.

Return values
ParserPartProxyFactory

setParserManager()

Sets up the passed ParserManager as the ParserManager for this part, which should be used when a new part is created (after its headers are read and a PartBuilder is created from it.)

public setParserManager(ParserManager $pm) : static
Parameters
$pm : ParserManager

The ParserManager to set.

Return values
static

createPart()

Creates a UUEncodedPartHeaderContainer attached to a PartBuilder, and calls $this->parserManager->createParserProxyFor().

private createPart(ParserNonMimeMessageProxy $parent) : ParserPartProxy

It also sets the PartBuilder's stream part start pos and content start pos to that of $parent->getNextParStart() (since a 'begin' line is read prior to another child being created, see parseNextPart()).

Parameters
$parent : ParserNonMimeMessageProxy
Return values
ParserPartProxy

Search results