Copied!

Provides a readable stream for a MessagePart.

CloneableInstantiable
Methods
public __call(string $method, array $args)
 

Allow decorators to implement custom methods

public __construct(ZBateson\MailMimeParser\Stream\StreamFactory $sdf, ZBateson\MailMimeParser\Message\IMessagePart $part)
public __destruct()
public __get(string $name)
 

Magic method used to create a new stream if streams are not added in
the constructor of a decorator (e.g., LazyOpenStream).

public __toString() : string
public close() : void
public detach()
public eof() : bool
public getContents() : string
public getMetadata( $key = NULL)
public getSize() : ?int
public isReadable() : bool
public isSeekable() : bool
public isWritable() : bool
public read( $length) : string
public rewind() : void
public seek( $offset, $whence = 0GuzzleHttp\Psr7\SEEK_SET) : void
public tell() : int
public update(SplSubject $subject)
 
public write( $string) : int
Properties
protected $appendStream
protected $part
 
protected $streamFactory
 
Methods
protected createStream()
 

Creates the underlying stream lazily when required.

protected getBoundaryAndChildStreams(ZBateson\MailMimeParser\Message\IMimePart $part)
 

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

protected getStreamsArray()
 

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

Methods
private getCharsetDecoratorForStream(Psr\Http\Message\StreamInterface $stream)
 

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

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

private getTransferEncodingDecoratorForStream(Psr\Http\Message\StreamInterface $stream)
 

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

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

private writePartContentTo(Psr\Http\Message\StreamInterface $stream)
 

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

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration