MessagePartStreamDecorator
in package
implements
StreamInterface
Uses
StreamDecoratorTrait
Provides a readable stream for a MessagePart.
Tags
Interfaces, Classes, Traits and Enums
- StreamInterface
Table of Contents
- $part : IMessagePart
- $stream : StreamInterface|null
- __call() : mixed
- __construct() : mixed
- __get() : StreamInterface
- __toString() : string
- close() : void
- detach() : mixed
- eof() : bool
- getContents() : string
- getMetadata() : mixed
- getSize() : int|null
- isReadable() : bool
- isSeekable() : bool
- isWritable() : bool
- read() : string
- Overridden to wrap exceptions in MessagePartReadException which provides 'getPart' to inspect the part the error occurs on.
- rewind() : void
- seek() : void
- tell() : int
- write() : int
- resolveStream() : StreamInterface
- Returns the underlying stream, lazily creating it via createStream() if not yet initialized.
Properties
$part
protected
IMessagePart
$part
$stream
protected
StreamInterface|null
$stream
= null
Methods
__call()
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
Return values
mixed —__construct()
public
__construct(IMessagePart $part[, StreamInterface|null $stream = null ]) : mixed
Parameters
- $part : IMessagePart
- $stream : StreamInterface|null = null
Return values
mixed —__get()
public
__get(string $name) : StreamInterface
Parameters
- $name : string
Return values
StreamInterface —__toString()
public
__toString() : string
Return values
string —close()
public
close() : void
Return values
void —detach()
public
detach() : mixed
Return values
mixed —eof()
public
eof() : bool
Return values
bool —getContents()
public
getContents() : string
Return values
string —getMetadata()
public
getMetadata([mixed $key = null ]) : mixed
Parameters
- $key : mixed = null
Return values
mixed —getSize()
public
getSize() : int|null
Return values
int|null —isReadable()
public
isReadable() : bool
Return values
bool —isSeekable()
public
isSeekable() : bool
Return values
bool —isWritable()
public
isWritable() : bool
Return values
bool —read()
Overridden to wrap exceptions in MessagePartReadException which provides 'getPart' to inspect the part the error occurs on.
public
read(int $length) : string
Parameters
- $length : int
Tags
Return values
string —rewind()
public
rewind() : void
Return values
void —seek()
public
seek(mixed $offset[, mixed $whence = SEEK_SET ]) : void
Parameters
- $offset : mixed
- $whence : mixed = SEEK_SET
Return values
void —tell()
public
tell() : int
Return values
int —write()
public
write(mixed $string) : int
Parameters
- $string : mixed
Return values
int —resolveStream()
Returns the underlying stream, lazily creating it via createStream() if not yet initialized.
protected
resolveStream() : StreamInterface