MailMimeParser 3.0

StreamFactory
in package

Factory class for Psr7 stream decorators used in MailMimeParser.

Tags
author

Zaahid Bateson

Table of Contents

$throwExceptionReadingPartContentFromUnsupportedCharsets  : bool
__construct()  : mixed
getLimitedContentStream()  : StreamInterface|null
Returns a SeekingLimitStream using $part->getStreamContentLength() and $part->getStreamContentStartPos()
getLimitedPartStream()  : StreamInterface
Returns a SeekingLimitStream using $part->getStreamPartLength() and $part->getStreamPartStartPos()
getTransferEncodingDecoratedStream()  : StreamInterface
newBase64Stream()  : StreamInterface
Creates and returns a Base64Stream with an internal PregReplaceFilterStream that filters out non-base64 characters.
newCharsetStream()  : StreamInterface
Creates and returns a CharsetStream
newChunkSplitStream()  : StreamInterface
Creates a ChunkSplitStream.
newDecoratedCachingStream()  : StreamInterface
Creates and returns a DecoratedCachingStream
newDecoratedMessagePartStream()  : MessagePartStreamDecorator
newHeaderStream()  : StreamInterface
Creates and returns a HeaderStream
newMessagePartStream()  : MessagePartStreamDecorator
Creates and returns a MessagePartStream
newNonClosingStream()  : StreamInterface
Creates a non-closing stream that doesn't close it's internal stream when closing/detaching.
newQuotedPrintableStream()  : StreamInterface
Creates and returns a QuotedPrintableStream.
newSeekingStream()  : StreamInterface
Creates and returns a SeekingLimitedStream without limits, so it's a stream that preserves its current position on the underlying stream it reads from.
newUUStream()  : StreamInterface
Creates and returns a UUStream
newLimitStream()  : StreamInterface
Creates and returns a SeekingLimitedStream.

Properties

$throwExceptionReadingPartContentFromUnsupportedCharsets

protected bool $throwExceptionReadingPartContentFromUnsupportedCharsets

if true, saving a content stream with an unsupported charset will be written in the default charset.

Methods

__construct()

public __construct(bool $throwExceptionReadingPartContentFromUnsupportedCharsets) : mixed
Parameters
$throwExceptionReadingPartContentFromUnsupportedCharsets : bool
Return values
mixed

getLimitedContentStream()

Returns a SeekingLimitStream using $part->getStreamContentLength() and $part->getStreamContentStartPos()

public getLimitedContentStream(PartBuilder $part) : StreamInterface|null
Parameters
$part : PartBuilder
Return values
StreamInterface|null

getLimitedPartStream()

Returns a SeekingLimitStream using $part->getStreamPartLength() and $part->getStreamPartStartPos()

public getLimitedPartStream(PartBuilder $part) : StreamInterface
Parameters
$part : PartBuilder
Return values
StreamInterface

getTransferEncodingDecoratedStream()

public getTransferEncodingDecoratedStream(StreamInterface $stream, string|null $transferEncoding[, string|null $filename = null ]) : StreamInterface
Parameters
$stream : StreamInterface
$transferEncoding : string|null
$filename : string|null = null
Return values
StreamInterface

newBase64Stream()

Creates and returns a Base64Stream with an internal PregReplaceFilterStream that filters out non-base64 characters.

public newBase64Stream(StreamInterface $stream) : StreamInterface
Parameters
$stream : StreamInterface
Return values
StreamInterface

newCharsetStream()

Creates and returns a CharsetStream

public newCharsetStream(StreamInterface $stream, string $streamCharset, string $stringCharset) : StreamInterface
Parameters
$stream : StreamInterface
$streamCharset : string
$stringCharset : string
Return values
StreamInterface

newChunkSplitStream()

Creates a ChunkSplitStream.

public newChunkSplitStream(StreamInterface $stream) : StreamInterface
Parameters
$stream : StreamInterface
Return values
StreamInterface

newDecoratedCachingStream()

Creates and returns a DecoratedCachingStream

public newDecoratedCachingStream(StreamInterface $stream, callable $decorator) : StreamInterface
Parameters
$stream : StreamInterface
$decorator : callable
Return values
StreamInterface

newHeaderStream()

Creates and returns a HeaderStream

public newHeaderStream(IMessagePart $part) : StreamInterface
Parameters
$part : IMessagePart
Return values
StreamInterface

newNonClosingStream()

Creates a non-closing stream that doesn't close it's internal stream when closing/detaching.

public newNonClosingStream(StreamInterface $stream) : StreamInterface
Parameters
$stream : StreamInterface
Return values
StreamInterface

newQuotedPrintableStream()

Creates and returns a QuotedPrintableStream.

public newQuotedPrintableStream(StreamInterface $stream) : StreamInterface
Parameters
$stream : StreamInterface
Return values
StreamInterface

newSeekingStream()

Creates and returns a SeekingLimitedStream without limits, so it's a stream that preserves its current position on the underlying stream it reads from.

public newSeekingStream(StreamInterface $stream) : StreamInterface
Parameters
$stream : StreamInterface
Return values
StreamInterface

newUUStream()

Creates and returns a UUStream

public newUUStream(StreamInterface $stream) : StreamInterface
Parameters
$stream : StreamInterface
Return values
StreamInterface

newLimitStream()

Creates and returns a SeekingLimitedStream.

private newLimitStream(StreamInterface $stream, int $length, int $start) : StreamInterface
Parameters
$stream : StreamInterface
$length : int
$start : int
Return values
StreamInterface

Search results