Documentation

InputStream
in package
implements IteratorAggregate

Provides a way to continuously write to the input of a Process until the InputStream is closed.

Tags
author

Nicolas Grekas p@tchwork.com

Interfaces, Classes and Traits

IteratorAggregate

Table of Contents

$input  : mixed
$onEmpty  : callable|null
$open  : mixed
close()  : mixed
Closes the write buffer.
getIterator()  : Traversable
isClosed()  : mixed
Tells whether the write buffer is closed or not.
onEmpty()  : mixed
Sets a callback that is called when the write buffer becomes empty.
write()  : mixed
Appends an input to the write buffer.

Properties

Methods

close()

Closes the write buffer.

public close() : mixed
Return values
mixed

getIterator()

public getIterator() : Traversable
Return values
Traversable

isClosed()

Tells whether the write buffer is closed or not.

public isClosed() : mixed
Return values
mixed

onEmpty()

Sets a callback that is called when the write buffer becomes empty.

public onEmpty([callable $onEmpty = null ]) : mixed
Parameters
$onEmpty : callable = null
Return values
mixed

write()

Appends an input to the write buffer.

public write(resource|string|int|float|bool|Traversable|null $input) : mixed
Parameters
$input : resource|string|int|float|bool|Traversable|null

The input to append as scalar, stream resource or \Traversable

Return values
mixed

Search results