MessagePartStream
    
            
            in package
            
        
    
            
            implements
                            StreamInterface,                             SplObserver                    
    
    
        
            Provides a readable stream for a MessagePart.
Tags
Interfaces, Classes and Traits
- StreamInterface
 - SplObserver
 
Table of Contents
- $appendStream : mixed
 - $part : IMessagePart
 - $streamFactory : StreamFactory
 - __construct() : mixed
 - Constructor
 - __destruct() : mixed
 - update() : mixed
 - 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
$appendStream
    protected
        mixed
    $appendStream
     = null
        
        
    
$part
    protected
        IMessagePart
    $part
    
    
        The part to read from.
$streamFactory
    protected
        StreamFactory
    $streamFactory
    
    
        For creating needed stream decorators.
Methods
__construct()
Constructor
    public
                __construct(StreamFactory $sdf, IMessagePart $part) : mixed
    
        Parameters
- $sdf : StreamFactory
 - $part : IMessagePart
 
Return values
mixed —__destruct()
    public
                __destruct() : mixed
        
    
    
        Return values
mixed —update()
    public
                update(SplSubject $subject) : mixed
        
        Parameters
- $subject : SplSubject
 
Return values
mixed —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) : mixed
    
        Parameters
- $stream : StreamInterface