FalDumpFileContentsDecoratorStream implements StreamInterface, SelfEmittableStreamInterface uses StreamDecoratorTrait
A lazy stream, that wraps the FAL dumpFileContents() method to send file contents using emit(), as defined in SelfEmittableStreamInterface.
This call will fall back to the FAL getFileContents() method if the fastpath possibility using SelfEmittableStreamInterface is not used.
Table of Contents
Interfaces
- StreamInterface
- SelfEmittableStreamInterface
- A PSR-7 stream which allows to be emitted on its own.
Properties
- $driver : DriverInterface
- $identifier : string
- $size : int
Methods
- __construct() : mixed
- emit() : mixed
- Emit the response to stdout, as specified in SelfEmittableStreamInterface.
- getSize() : int
- isWritable() : bool
- write() : int
- createStream() : StreamInterface
- Creates a stream (on demand). This method is consumed by the guzzle StreamDecoratorTrait and is used when this stream is used without the emit() fastpath.
Properties
$driver read-only
protected
DriverInterface
$driver
$identifier read-only
protected
string
$identifier
$size read-only
protected
int
$size
Methods
__construct()
public
__construct(string $identifier, DriverInterface $driver, int $size) : mixed
Parameters
- $identifier : string
- $driver : DriverInterface
- $size : int
emit()
Emit the response to stdout, as specified in SelfEmittableStreamInterface.
public
emit() : mixed
Offload to the driver method dumpFileContents.
getSize()
public
getSize() : int
Return values
intisWritable()
public
isWritable() : bool
Return values
boolwrite()
public
write(string $string) : int
Parameters
- $string : string
Tags
Return values
intcreateStream()
Creates a stream (on demand). This method is consumed by the guzzle StreamDecoratorTrait and is used when this stream is used without the emit() fastpath.
protected
createStream() : StreamInterface