Copied!

Provides a readable stream for a MessagePart.

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

Allow decorators to implement custom methods

  • return mixed
public __construct(ZBateson\MailMimeParser\Message\IMessagePart $part, ?Psr\Http\Message\StreamInterface $stream = NULL)
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(int $length) : string
 

Overridden to wrap exceptions in MessagePartReadException which provides 'getPart' to inspect the part the error occurs on.

  • throws \MessagePartStreamReadException
public rewind() : void
public seek( $offset, $whence = 0GuzzleHttp\Psr7\SEEK_SET) : void
public tell() : int
public write( $string) : int
Properties
protected ZBateson\MailMimeParser\Message\IMessagePart $part
 
  • var \IMessagePart The part to read from.
protected ?Psr\Http\Message\StreamInterface $stream
Methods
protected createStream() : Psr\Http\Message\StreamInterface
 

Implement in subclasses to dynamically create streams when requested.

  • throws \BadMethodCallException
Methods
private decoratorRead( $length) : string
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration