MailMimeParser 2.3

MessageParser
in package

Parses a mail mime message into its component parts. To invoke, call {@see MailMimeParser::parse()}.

Tags
author

Zaahid Bateson

Table of Contents

$headerParser  : HeaderParser
$parserManager  : ParserManager
$partBuilderFactory  : PartBuilderFactory
$partHeaderContainerFactory  : PartHeaderContainerFactory
__construct()  : mixed
parse()  : IMessage
Parses the passed stream into an {@see ZBateson\MailMimeParser\IMessage} object and returns it.
readLine()  : string|bool
Convenience method to read a line of up to 4096 characters from the passed resource handle.

Properties

$partBuilderFactory

protected PartBuilderFactory $partBuilderFactory

To create a PartBuilder representing this message, and to pass it to ParserManager.

Methods

parse()

Parses the passed stream into an {@see ZBateson\MailMimeParser\IMessage} object and returns it.

public parse(StreamInterface $stream) : IMessage
Parameters
$stream : StreamInterface

the stream to parse the message from

Return values
IMessage

readLine()

Convenience method to read a line of up to 4096 characters from the passed resource handle.

public static readLine(resource $handle) : string|bool

If the line is larger than 4096 characters, the remaining characters in the line are read and discarded, and only the first 4096 characters are returned.

Parameters
$handle : resource
Return values
string|bool

the read line or false on EOF or on error.

Search results