Class DroppingStream
- GuzzleHttp\Psr7\DroppingStream implements Psr\Http\Message\StreamInterface uses GuzzleHttp\Psr7\StreamDecoratorTrait
- Namespace: GuzzleHttp\Psr7
- Located at DroppingStream.php
Stream decorator that begins dropping data once the size of the underlying stream becomes too full.
Methods Summary
- __construct ( Psr\Http\Message\StreamInterface $stream, int $maxLength )
-
write ( string $string )
Write data to the stream.
Methods inherited from Psr\Http\Message\StreamInterface
__toString()
,
close()
,
detach()
,
eof()
,
getContents()
,
getMetadata()
,
getSize()
,
isReadable()
,
isSeekable()
,
isWritable()
,
read()
,
rewind()
,
seek()
,
tell()
Methods used from GuzzleHttp\Psr7\StreamDecoratorTrait
Methods Details
__construct (
Psr\Http\Message\StreamInterface
$stream,
integer
$maxLength
)
Parameters
Psr\Http\Message\StreamInterface |
$stream | Underlying stream to decorate. |
integer | $maxLength | Maximum size before dropping data. |
integer write ( string $string )
Write data to the stream.
Parameters
string | $string | The string that is to be written. |
Returns
integer Returns the number of bytes written to the stream. |
Exceptions
RuntimeException on failure. |