Open Journal Systems  3.3.0
GuzzleHttp\Psr7\DroppingStream Class Reference
Inheritance diagram for GuzzleHttp\Psr7\DroppingStream:
Psr\Http\Message\StreamInterface

Public Member Functions

 __construct (StreamInterface $stream, $maxLength)
 
 write ($string)
 
- Public Member Functions inherited from Psr\Http\Message\StreamInterface
 __toString ()
 
 close ()
 
 detach ()
 
 eof ()
 
 getContents ()
 
 getMetadata ($key=null)
 
 getSize ()
 
 isReadable ()
 
 isSeekable ()
 
 isWritable ()
 
 read ($length)
 
 rewind ()
 
 seek ($offset, $whence=SEEK_SET)
 
 tell ()
 

Detailed Description

Stream decorator that begins dropping data once the size of the underlying stream becomes too full.

Definition at line 10 of file DroppingStream.php.

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\Psr7\DroppingStream::__construct ( StreamInterface  $stream,
  $maxLength 
)
Parameters
StreamInterface$streamUnderlying stream to decorate.
int$maxLengthMaximum size before dropping data.

Definition at line 20 of file DroppingStream.php.

Member Function Documentation

◆ write()

GuzzleHttp\Psr7\DroppingStream::write (   $string)

Write data to the stream.

Parameters
string$stringThe string that is to be written.
Returns
int Returns the number of bytes written to the stream.
Exceptions

Implements Psr\Http\Message\StreamInterface.

Definition at line 26 of file DroppingStream.php.


The documentation for this class was generated from the following file: