Proxy between a MessagePart and a Parser.

ParserPartProxy objects are responsible for ferrying requests from message parts to a proxy as they're requested, and for maintaining state information for a parser as necessary.

public __construct(ZBateson\MailMimeParser\Parser\PartBuilder $partBuilder, ZBateson\MailMimeParser\Parser\IParser $parser)
public ZBateson\MailMimeParser\Parser\PartBuilder::__destruct()
public getHeaderContainer()
public getMessageResourceHandle()
public getMessageResourceHandlePos() : int
public getParent()
public getPart()

Returns the IMessagePart associated with this proxy.

  • return \IMessagePart the part.
public getStream()
public getStreamContentLength() : int
public getStreamContentStartPos() : ?int
public getStreamPartLength() : int
public getStreamPartStartPos() : int
public isContentParsed() : ?bool
public isMime() : bool
public parseAll()

Parses everything under this part.

For ParserPartProxy, this is just content, but sub-classes may override this to parse all children as well for example.

  • return static
public parseContent()

Requests the parser to parse this part's content, and call setStreamContentStartPos/EndPos to setup this part's boundaries within the main message's raw stream.

The method first checks to see if the content has already been parsed, and is safe to call multiple times.

  • return static
public setPart(ZBateson\MailMimeParser\Message\IMessagePart $part) : self

Sets the associated part.

  • param \IMessagePart $part The part
public setStreamContentStartPos(int $streamContentStartPos)
  • return static
public setStreamPartAndContentEndPos(int $streamContentEndPos)
  • return static
public setStreamPartEndPos(int $streamPartEndPos)
  • return static
public setStreamPartStartPos(int $streamPartStartPos)
  • return static
protected $parser = NULL
  • var \IParser The parser.
protected $partBuilder = NULL
  • var \PartBuilder The part's PartBuilder.
private $part = NULL
  • var \IMessagePart The part.
© 2024 Bruce Wells
Search Namespaces \ Classes