MediaWiki fundraising/REL1_35
MWCallbackStream Class Reference

Callback-aware stream. More...

Inheritance diagram for MWCallbackStream:
Collaboration diagram for MWCallbackStream:

Public Member Functions

 __construct (callable $cb)
 
 write ( $string)
 

Protected Attributes

StreamInterface $stream
 

Private Attributes

 $callback
 

Detailed Description

Callback-aware stream.

Allows using a callback function to receive data in contexts where a PSR-7 stream is required. This was created so that GuzzleHttpRequest can support our "callback" option, for backward compatibility. Newer code that uses GuzzleHttpRequest should consider using the "sink" option instead.

Definition at line 36 of file MWCallbackStream.php.

Constructor & Destructor Documentation

◆ __construct()

MWCallbackStream::__construct ( callable $cb)

Definition at line 44 of file MWCallbackStream.php.

Member Function Documentation

◆ write()

MWCallbackStream::write ( $string)

Definition at line 49 of file MWCallbackStream.php.

Member Data Documentation

◆ $callback

MWCallbackStream::$callback
private

Definition at line 39 of file MWCallbackStream.php.

◆ $stream

StreamInterface MWCallbackStream::$stream
protected

Definition at line 42 of file MWCallbackStream.php.


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