HeaderStream implements StreamInterface Uses StreamDecoratorTrait
Psr7 stream decorator implementation providing a readable stream for a part's headers.
HeaderStream is only used by a MimePart parent. It can accept any MessagePart - for non-MimeParts, only type headers are generated based on available information.
Tags
Interfaces, Classes and Traits
- StreamInterface
 
Table of Contents
- $part : MessagePart
 - __construct() : mixed
 - Constructor
 - writePartHeadersTo() : mixed
 - Writes out headers for $this->part and follows them with an empty line.
 - createStream() : StreamInterface
 - Creates the underlying stream lazily when required.
 - getPartHeadersIterator() : array<string|int, mixed>
 - Returns a header array for the current part.
 
Properties
$part
    protected
        MessagePart
    $part
    
        
    
Methods
__construct()
Constructor
    public
                __construct(MessagePart $part) : mixed
        
        Parameters
- $part : MessagePart
 
Return values
mixed —writePartHeadersTo()
Writes out headers for $this->part and follows them with an empty line.
    public
                writePartHeadersTo(StreamInterface $stream) : mixed
        
        Parameters
- $stream : StreamInterface
 
Return values
mixed —createStream()
Creates the underlying stream lazily when required.
    protected
                createStream() : StreamInterface
        
    
    
        Return values
StreamInterface —getPartHeadersIterator()
Returns a header array for the current part.
    private
                getPartHeadersIterator() : array<string|int, mixed>
        If the part is not a MimePart, Content-Type, Content-Disposition and Content-Transfer-Encoding headers are generated manually.