MailMimeParser 3.0

ParserUUEncodedPartProxy extends ParserPartProxy
in package

A bi-directional parser-to-part proxy for NonMimeParser and IUUEncodedParts.

Tags
author

Zaahid Bateson

Table of Contents

$parser  : IParserService
$partBuilder  : PartBuilder
$headerContainer  : PartHeaderContainer
$messageHandle  : mixed
$messageStream  : StreamInterface|null
$parent  : ParserPartProxy|null
$part  : IMessagePart
$streamContentEndPos  : int|null
$streamContentStartPos  : int|null
$streamPartEndPos  : int
$streamPartStartPos  : int
__construct()  : mixed
__destruct()  : mixed
addError()  : ParserPartProxy
getFilename()  : string|null
Returns the filename included in the uuencoded 'begin' line for this part.
getHeaderContainer()  : PartHeaderContainer
Returns this part's PartHeaderContainer.
getMessageResourceHandle()  : resource
Returns the resource handle for a the message's stream, getting it from the parent part if this is a child part.
getMessageResourceHandlePos()  : int
Shortcut for calling ftell($partBuilder->getMessageResourceHandle()).
getNextPartFilename()  : string|null
Returns the next part's filename in a uu-encoded 'begin' line if one exists, or null otherwise.
getNextPartMode()  : int|null
Returns the next part's unix file mode in a uu-encoded 'begin' line if one exists, or null otherwise.
getNextPartStart()  : int|null
Returns the next part's start position within the message's raw stream, or null if not set, not discovered, or there are no more parts under this message.
getParent()  : ParserNonMimeMessageProxy
Only has a single parent of type ParserNonMimeMessageProxy, overridden to specify ParserNonMimeMessageProxy as the return type.
getPart()  : IMessagePart
Returns the IMessagePart associated with this proxy.
getStream()  : StreamInterface
Returns the raw message StreamInterface for a message, getting it from the parent part if this is a child part.
getStreamContentLength()  : int
Returns the length of this part's content stream.
getStreamContentStartPos()  : int|null
Returns the byte offset start position of the content of this part within the main raw message stream, or null if not set.
getStreamPartLength()  : int
Returns the number of raw bytes this part has.
getStreamPartStartPos()  : int
Returns the byte offset start position for this part within the message stream.
getUnixFileMode()  : int|null
Returns the file mode included in the uuencoded 'begin' line for this part.
isContentParsed()  : bool
Returns true if the byte offset positions for this part's content have been set.
isMime()  : bool
Returns true if this part, or any parent, have a Content-Type or MIME-Version header set.
parseAll()  : static
Parses everything under this part.
parseContent()  : static
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.
setNextPartFilename()  : static
Sets the next part's filename from its 'begin' line.
setNextPartMode()  : static
Sets the next part's unix file mode from its 'begin' line.
setNextPartStart()  : static
Sets the next part's start position within the message's raw stream.
setPart()  : static
Sets the associated part.
setStreamContentStartPos()  : static
Sets the byte offset start position of the content in the raw message stream.
setStreamPartAndContentEndPos()  : static
Sets the byte offset end position of the content and part in the raw message stream.
setStreamPartEndPos()  : static
Sets the byte offset end position of the part in the raw message stream, and also calls its parent's setParentStreamPartEndPos to expand to parent PartBuilders.
setStreamPartStartPos()  : static
Sets the byte offset start position of the part in the raw message stream.

Properties

$messageHandle

private mixed $messageHandle = null

the raw message input stream handle constructed from $messageStream or null for a child part

$messageStream

private StreamInterface|null $messageStream = null

the raw message input stream for a message, or null for a child part.

$parent

private ParserPartProxy|null $parent = null

The parent ParserPartProxy if one is set, or null if part doesn't have a parent.

$streamContentEndPos

private int|null $streamContentEndPos = null

The offset read end position in the message's stream for the end of this part's content (body).

$streamContentStartPos

private int|null $streamContentStartPos = null

The offset read start position in the message's stream for the beginning of this part's content (body).

$streamPartEndPos

private int $streamPartEndPos

The offset read end position for this part. If the part is a multipart mime part, the end position is after all of this parts children.

$streamPartStartPos

private int $streamPartStartPos

The offset read start position for this part (beginning of headers) in the message's stream.

Methods

__destruct()

public __destruct() : mixed
Return values
mixed

getFilename()

Returns the filename included in the uuencoded 'begin' line for this part.

public getFilename() : string|null
Return values
string|null

getMessageResourceHandle()

Returns the resource handle for a the message's stream, getting it from the parent part if this is a child part.

public getMessageResourceHandle() : resource
Return values
resource

getMessageResourceHandlePos()

Shortcut for calling ftell($partBuilder->getMessageResourceHandle()).

public getMessageResourceHandlePos() : int
Return values
int

getNextPartFilename()

Returns the next part's filename in a uu-encoded 'begin' line if one exists, or null otherwise.

public getNextPartFilename() : string|null

As this is a message-wide setting, ParserUUEncodedPartProxy calls getNextPartFilename() on its parent (a ParserNonMimeMessageProxy, which stores/returns this information).

Return values
string|null

The file name or null

getNextPartMode()

Returns the next part's unix file mode in a uu-encoded 'begin' line if one exists, or null otherwise.

public getNextPartMode() : int|null

As this is a message-wide setting, ParserUUEncodedPartProxy calls getNextPartMode() on its parent (a ParserNonMimeMessageProxy, which stores/returns this information).

Return values
int|null

The file mode or null

getNextPartStart()

Returns the next part's start position within the message's raw stream, or null if not set, not discovered, or there are no more parts under this message.

public getNextPartStart() : int|null

As this is a message-wide setting, ParserUUEncodedPartProxy calls getNextPartStart() on its parent (a ParserNonMimeMessageProxy, which stores/returns this information).

Return values
int|null

The start position or null

getStream()

Returns the raw message StreamInterface for a message, getting it from the parent part if this is a child part.

public getStream() : StreamInterface
Return values
StreamInterface

getStreamContentLength()

Returns the length of this part's content stream.

public getStreamContentLength() : int

This method does not perform checks on whether the start pos and end pos of this part's content have been set, and so could cause errors if called before being set and are still null.

Return values
int

getStreamContentStartPos()

Returns the byte offset start position of the content of this part within the main raw message stream, or null if not set.

public getStreamContentStartPos() : int|null
Return values
int|null

getStreamPartLength()

Returns the number of raw bytes this part has.

public getStreamPartLength() : int

This method does not perform checks on whether the start pos and end pos of this part have been set, and so could cause errors if called before being set and are still null.

Return values
int

getStreamPartStartPos()

Returns the byte offset start position for this part within the message stream.

public getStreamPartStartPos() : int
Return values
int

getUnixFileMode()

Returns the file mode included in the uuencoded 'begin' line for this part.

public getUnixFileMode() : int|null
Return values
int|null

isContentParsed()

Returns true if the byte offset positions for this part's content have been set.

public isContentParsed() : bool
Return values
bool

true if set.

isMime()

Returns true if this part, or any parent, have a Content-Type or MIME-Version header set.

public isMime() : bool
Return values
bool

true if it's a mime message or child of a mime message.

parseAll()

Parses everything under this part.

public parseAll() : static

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

Return values
static

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.

public parseContent() : static

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

Return values
static

setNextPartFilename()

Sets the next part's filename from its 'begin' line.

public setNextPartFilename(string $nextPartFilename) : static

As this is a message-wide setting, ParserUUEncodedPartProxy calls setNextPartFilename() on its parent (a ParserNonMimeMessageProxy, which stores/returns this information).

Parameters
$nextPartFilename : string
Return values
static

setNextPartMode()

Sets the next part's unix file mode from its 'begin' line.

public setNextPartMode(int $nextPartMode) : static

As this is a message-wide setting, ParserUUEncodedPartProxy calls setNextPartMode() on its parent (a ParserNonMimeMessageProxy, which stores/returns this information).

Parameters
$nextPartMode : int
Return values
static

setNextPartStart()

Sets the next part's start position within the message's raw stream.

public setNextPartStart(int $nextPartStart) : static

As this is a message-wide setting, ParserUUEncodedPartProxy calls setNextPartStart() on its parent (a ParserNonMimeMessageProxy, which stores/returns this information).

Parameters
$nextPartStart : int
Return values
static

setStreamContentStartPos()

Sets the byte offset start position of the content in the raw message stream.

public setStreamContentStartPos(int $streamContentStartPos) : static
Parameters
$streamContentStartPos : int
Return values
static

setStreamPartAndContentEndPos()

Sets the byte offset end position of the content and part in the raw message stream.

public setStreamPartAndContentEndPos(int $streamContentEndPos) : static
Parameters
$streamContentEndPos : int
Return values
static

setStreamPartEndPos()

Sets the byte offset end position of the part in the raw message stream, and also calls its parent's setParentStreamPartEndPos to expand to parent PartBuilders.

public setStreamPartEndPos(int $streamPartEndPos) : static
Parameters
$streamPartEndPos : int
Return values
static

setStreamPartStartPos()

Sets the byte offset start position of the part in the raw message stream.

public setStreamPartStartPos(int $streamPartStartPos) : static
Parameters
$streamPartStartPos : int
Return values
static

Search results