Factory class for Psr7 stream decorators used in MailMimeParser.

author Zaahid Bateson
package MailMimeParser

 Methods

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

getLimitedContentStream(\Psr\Http\Message\StreamInterface $stream, \ZBateson\MailMimeParser\Message\Part\PartBuilder $part) : \ZBateson\StreamDecorators\SeekingLimitStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

$part

\ZBateson\MailMimeParser\Message\Part\PartBuilder

Returns

\ZBateson\StreamDecorators\SeekingLimitStream

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

getLimitedPartStream(\Psr\Http\Message\StreamInterface $stream, \ZBateson\MailMimeParser\Message\Part\PartBuilder $part) : \ZBateson\StreamDecorators\SeekingLimitStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

$part

\ZBateson\MailMimeParser\Message\Part\PartBuilder

Returns

\ZBateson\StreamDecorators\SeekingLimitStream

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

newBase64Stream(\Psr\Http\Message\StreamInterface $stream) : \ZBateson\StreamDecorators\Base64Stream

Parameters

$stream

\Psr\Http\Message\StreamInterface

Returns

\ZBateson\StreamDecorators\Base64Stream

Creates and returns a CharsetStream

newCharsetStream(\Psr\Http\Message\StreamInterface $stream, string $fromCharset, string $toCharset) : \ZBateson\StreamDecorators\CharsetStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

$fromCharset

string

$toCharset

string

Returns

\ZBateson\StreamDecorators\CharsetStream

Creates a ChunkSplitStream.

newChunkSplitStream(\Psr\Http\Message\StreamInterface $stream) : \ZBateson\StreamDecorators\ChunkSplitStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

Returns

\ZBateson\StreamDecorators\ChunkSplitStream

Creates and returns a HeaderStream

newHeaderStream(\ZBateson\MailMimeParser\Message\Part\MessagePart $part) : \ZBateson\MailMimeParser\Stream\HeaderStream

Parameters

$part

\ZBateson\MailMimeParser\Message\Part\MessagePart

Returns

\ZBateson\MailMimeParser\Stream\HeaderStream

Creates and returns a MessagePartStream

newMessagePartStream(\ZBateson\MailMimeParser\Message\Part\MessagePart $part) : \ZBateson\MailMimeParser\Stream\MessagePartStream

Parameters

$part

\ZBateson\MailMimeParser\Message\Part\MessagePart

Returns

\ZBateson\MailMimeParser\Stream\MessagePartStream

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

newNonClosingStream(\Psr\Http\Message\StreamInterface $stream) : \ZBateson\StreamDecorators\NonClosingStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

Returns

\ZBateson\StreamDecorators\NonClosingStream

Creates and returns a QuotedPrintableStream.

newQuotedPrintableStream(\Psr\Http\Message\StreamInterface $stream) : \ZBateson\StreamDecorators\QuotedPrintableStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

Returns

\ZBateson\StreamDecorators\QuotedPrintableStream

Creates and returns a UUStream

newUUStream(\Psr\Http\Message\StreamInterface $stream) : \ZBateson\StreamDecorators\UUStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

Returns

\ZBateson\StreamDecorators\UUStream

Creates and returns a SeekingLimitedStream.

newLimitStream(\Psr\Http\Message\StreamInterface $stream, integer $length, integer $start) : \ZBateson\StreamDecorators\SeekingLimitStream

Parameters

$stream

\Psr\Http\Message\StreamInterface

$length

integer

$start

integer

Returns

\ZBateson\StreamDecorators\SeekingLimitStream