MailMimeParser 1.1

MessagePartStream implements StreamInterface Uses StreamDecoratorTrait

Provides a readable stream for a MessagePart.

Tags
author

Zaahid Bateson

Interfaces, Classes and Traits

StreamInterface

Table of Contents

$part  : MessagePart
$streamFactory  : StreamFactory
__construct()  : mixed
Constructor
createStream()  : StreamInterface
Creates the underlying stream lazily when required.
getBoundaryAndChildStreams()  : array<string|int, StreamInterface>
Creates an array of streams based on the attached part's mime boundary and child streams.
getStreamsArray()  : array<string|int, StreamInterface>
Returns an array of Psr7 Streams representing the attached part and it's direct children.
getCharsetDecoratorForStream()  : StreamInterface
Attaches and returns a CharsetStream decorator to the passed $stream.
getTransferEncodingDecoratorForStream()  : StreamInterface
Attaches and returns a transfer encoding stream decorator to the passed $stream.
writePartContentTo()  : mixed
Writes out the content portion of the attached mime part to the passed $stream.

Properties

Methods

createStream()

Creates the underlying stream lazily when required.

protected createStream() : StreamInterface
Return values
StreamInterface

getBoundaryAndChildStreams()

Creates an array of streams based on the attached part's mime boundary and child streams.

protected getBoundaryAndChildStreams(ParentHeaderPart $part) : array<string|int, StreamInterface>
Parameters
$part : ParentHeaderPart

passed in because $this->part is declared as MessagePart

Return values
array<string|int, StreamInterface>

getStreamsArray()

Returns an array of Psr7 Streams representing the attached part and it's direct children.

protected getStreamsArray() : array<string|int, StreamInterface>
Return values
array<string|int, StreamInterface>

getCharsetDecoratorForStream()

Attaches and returns a CharsetStream decorator to the passed $stream.

private getCharsetDecoratorForStream(StreamInterface $stream) : StreamInterface

If the current attached MessagePart doesn't specify a charset, $stream is returned as-is.

Parameters
$stream : StreamInterface
Return values
StreamInterface

getTransferEncodingDecoratorForStream()

Attaches and returns a transfer encoding stream decorator to the passed $stream.

private getTransferEncodingDecoratorForStream(StreamInterface $stream) : StreamInterface

The attached stream decorator is based on the attached part's returned value from MessagePart::getContentTransferEncoding, using one of the following stream decorators as appropriate:

o QuotedPrintableStream o Base64Stream o UUStream

Parameters
$stream : StreamInterface
Return values
StreamInterface

writePartContentTo()

Writes out the content portion of the attached mime part to the passed $stream.

private writePartContentTo(StreamInterface $stream) : mixed
Parameters
$stream : StreamInterface
Return values
mixed

Search results