Provides a way to continuously write to the input of a Process until the InputStream is closed.
- author Nicolas Grekas
- implements \IteratorAggregate<int, string>
CloneableInstantiableIterable
- Implements
IteratorAggregate Traversable
Methods |
public close() : void Closes the write buffer. |
public getIterator() : Traversable |
public isClosed() : bool Tells whether the write buffer is closed or not. |
public onEmpty(?callable $onEmpty = NULL) : void Sets a callback that is called when the write buffer becomes empty. |
public write(?mixed $input) : void Appends an input to the write buffer.
|
Properties |
private array $input = [] |
private ?Closure $onEmpty = NULL |
private bool $open = true |