38 parent::__construct(
$input);
52 $nullstream = fopen(
'/dev/null',
'c');
63 array(
'file',
'/dev/tty',
'r'),
64 array(
'file',
'/dev/tty',
'w'),
65 array(
'file',
'/dev/tty',
'w'),
109 $this->pipes =
array();
115 foreach (
$r as $pipe) {
118 $read[$type = array_search($pipe, $this->pipes,
true)] =
'';
121 $data = fread($pipe, self::CHUNK_SIZE);
123 }
while (isset(
$data[0]));
125 if (!isset(
$read[$type][0])) {
129 if ($close && feof($pipe)) {
131 unset($this->pipes[$type]);
getFiles()
{Returns an array of filenames indexed by their related stream in case these pipes use temporary file...
write()
Writes input to stdin.
haveReadSupport()
{Returns if pipes are able to read output.bool}
UnixPipes implementation uses unix pipes as handles.
hasSystemCallBeenInterrupted()
Returns true if a system call has been interrupted.
areOpen()
{Returns if the current state has open file handles or pipes.bool}
Create styles array
The data for the language used.
static isPtySupported()
Returns whether PTY is supported on the current operating system.
getDescriptors()
{Returns an array of descriptors for the use of proc_open.array}
close()
{Closes file handles and pipes.}
__construct($ttyMode, $ptyMode, $input, $haveReadSupport)
readAndWrite($blocking, $close=false)
{Reads data in file handles and pipes.Whether to use blocking calls or not Whether to close pipes if ...
unblock()
Unblocks streams.