MailMimeParser 2.4

MessagePartStream
in package
implements SplObserver, StreamInterface Uses StreamDecoratorTrait

Provides a readable stream for a MessagePart.

Tags
author

Zaahid Bateson

Interfaces, Classes, Traits and Enums

SplObserver
StreamInterface

Table of Contents

$appendStream  : mixed
$part  : IMessagePart
$streamFactory  : StreamFactory
__construct()  : mixed
Constructor
__destruct()  : mixed
update()  : void
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()  : self
Writes out the content portion of the attached mime part to the passed $stream.

Properties

Methods

update()

public update(SplSubject $subject) : void
Parameters
$subject : SplSubject
Return values
void

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(IMimePart $part) : array<string|int, StreamInterface>
Parameters
$part : IMimePart

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

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 IMessagePart 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) : self
Parameters
$stream : StreamInterface
Return values
self

Search results