AbstractParserService
in package
implements
IParserService
Provides basic implementations for: - IParser::setParserManager - IParser::getParserMessageProxyFactory (returns $this->parserMessageProxyFactory which can be set via the default constructor) - IParser::getParserPartProxyFactory (returns $this->parserPartProxyFactory which can be set via the default constructor)
Tags
Interfaces, Classes, Traits and Enums
- IParserService
- Interface defining a message part parser.
Table of Contents
- $parserManager : ParserManagerService
- $parserMessageProxyFactory : ParserPartProxyFactory
- $parserPartProxyFactory : ParserPartProxyFactory
- $partBuilderFactory : PartBuilderFactory
- __construct() : mixed
- 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.
- 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.)
Properties
$parserManager
protected
ParserManagerService
$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.
$partBuilderFactory
protected
PartBuilderFactory
$partBuilderFactory
Service for creating PartBuilder objects for new children.
Methods
__construct()
public
__construct(ParserPartProxyFactory $parserMessageProxyFactory, ParserPartProxyFactory $parserPartProxyFactory, PartBuilderFactory $partBuilderFactory) : mixed
Parameters
- $parserMessageProxyFactory : ParserPartProxyFactory
- $parserPartProxyFactory : ParserPartProxyFactory
- $partBuilderFactory : PartBuilderFactory
Return values
mixed —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(ParserManagerService $pm) : static
Parameters
- $pm : ParserManagerService
-
The ParserManager to set.