InputStream::onEmpty()

onEmpty(callable $onEmpty = null) Sets a callback that is called when the write buffer becomes empty. Parameters callable $onEmpty

InputStream::isClosed()

isClosed() Tells whether the write buffer is closed or not.

InputStream::getIterator()

getIterator()

InputStream::close()

close() Closes the write buffer.

InputStream

class InputStream implements IteratorAggregate Provides a way to continuously write to the input of a Process until the InputStream is closed. Methods onEmpty(callable $onEmpty = null) Sets a callback that is called when the write buffer becomes empty. write(resource|scalar|Traversable|null $input) Appends an input to the write buffer. close() Closes the write buffer. isClosed() Tells whether the write buffer is closed or not. getIterator() Details

InputOption::setDefault()

setDefault(mixed $default = null) Sets the default value. Parameters mixed $default The default value Exceptions LogicException When incorrect default value is given

InputOption::isValueRequired()

bool isValueRequired() Returns true if the option requires a value. Return Value bool true if value mode is self::VALUE_REQUIRED, false otherwise

InputOption::isValueOptional()

bool isValueOptional() Returns true if the option takes an optional value. Return Value bool true if value mode is self::VALUE_OPTIONAL, false otherwise

InputOption::isArray()

bool isArray() Returns true if the option can take multiple values. Return Value bool true if mode is self::VALUEISARRAY, false otherwise

InputOption::getShortcut()

string getShortcut() Returns the option shortcut. Return Value string The shortcut