Provides a readable stream for a MessagePart.

public __call(string $method, array $args)

Allow decorators to implement custom methods

  • return mixed
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).

  • return \StreamInterface
public __toString() : string
public close() : void
public detach()
public eof() : bool
public getContents() : string
public getMetadata( $key = NULL)
  • return mixed
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) : void
public write( $string) : int
protected $appendStream = NULL
protected $part = NULL
  • var \IMessagePart The part to read from.
protected $streamFactory = NULL
  • var \StreamFactory For creating needed stream decorators.
protected createStream() : Psr\Http\Message\StreamInterface

Creates the underlying stream lazily when required.

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

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

  • param \IMimePart $part passed in because $this->part is declared as IMessagePart
  • return \StreamInterface[]
protected getStreamsArray() : array

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

  • return \StreamInterface[]
private getCharsetDecoratorForStream(Psr\Http\Message\StreamInterface $stream) : Psr\Http\Message\StreamInterface

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) : Psr\Http\Message\StreamInterface

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) : self

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

© 2024 Bruce Wells
Search Namespaces \ Classes