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

implements

\IteratorAggregate<int, string>

Table of Contents

Interfaces

IteratorAggregate

Properties

$input  : array<string|int, mixed>
$onEmpty  : Closure|null
$open  : bool

Methods

close()  : void
Closes the write buffer.
getIterator()  : Traversable
isClosed()  : bool
Tells whether the write buffer is closed or not.
onEmpty()  : void
Sets a callback that is called when the write buffer becomes empty.
write()  : void
Appends an input to the write buffer.

Properties

Methods

close()

Closes the write buffer.

public close() : void

getIterator()

public getIterator() : Traversable
Return values
Traversable

isClosed()

Tells whether the write buffer is closed or not.

public isClosed() : bool
Return values
bool

onEmpty()

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

public onEmpty([callable|null $onEmpty = null ]) : void
Parameters
$onEmpty : callable|null = null

write()

Appends an input to the write buffer.

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

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


        
On this page

Search results