PHP Class Amp\Artax\IteratorWriter

Inheritance: implements Amp\Artax\Writer
Show file Open project: amphp/artax

Public Methods

Method Description
__construct ( Amp\Artax\WriterFactory $writerFactory = null )
write ( resource $socket, mixed $iterator ) : Amp\Promise Write iterator content to the socket.

Private Methods

Method Description
afterElementWrite ( Exception $error = null, $result = null )
finalizeEventualWriteElement ( $current )
writeNextElement ( )

Method Details

__construct() public method

public __construct ( Amp\Artax\WriterFactory $writerFactory = null )
$writerFactory Amp\Artax\WriterFactory

write() public method

Write iterator content to the socket.
public write ( resource $socket, mixed $iterator ) : Amp\Promise
$socket resource
$iterator mixed
return Amp\Promise