class UnixPipes extends AbstractPipes

UnixPipes implementation uses unix pipes as handles.

Properties

$pipes from AbstractPipes

Methods

__construct(bool|null $ttyMode, bool $ptyMode, resource|string|int|float|bool|Iterator|null $input, bool $haveReadSupport)

No description

close()

Closes file handles and pipes.

bool
hasSystemCallBeenInterrupted()

Returns true if a system call has been interrupted.

unblock()

Unblocks streams.

write()

Writes input to stdin.

handleError($type, $msg)

No description

__destruct()

No description

array
getDescriptors()

Returns an array of descriptors for the use of proc_open.

string[]
getFiles()

Returns an array of filenames indexed by their related stream in case these pipes use temporary files.

string[]
readAndWrite(bool $blocking, bool $close = false)

Reads data in file handles and pipes.

bool
haveReadSupport()

Returns if pipes are able to read output.

bool
areOpen()

Returns if the current state has open file handles or pipes.

Details

at line 29
__construct(bool|null $ttyMode, bool $ptyMode, resource|string|int|float|bool|Iterator|null $input, bool $haveReadSupport)

Parameters

bool|null $ttyMode
bool $ptyMode
resource|string|int|float|bool|Iterator|null $input
bool $haveReadSupport

in AbstractPipes at line 47
close()

Closes file handles and pipes.

in AbstractPipes at line 60
protected bool hasSystemCallBeenInterrupted()

Returns true if a system call has been interrupted.

Return Value

bool

in AbstractPipes at line 72
protected unblock()

Unblocks streams.

in AbstractPipes at line 93
protected write()

Writes input to stdin.

Exceptions

InvalidArgumentException When an input iterator yields a non supported value

in AbstractPipes at line 174
handleError($type, $msg)

Parameters

$type
$msg

at line 38
__destruct()

at line 46
array getDescriptors()

Returns an array of descriptors for the use of proc_open.

Return Value

array

at line 84
string[] getFiles()

Returns an array of filenames indexed by their related stream in case these pipes use temporary files.

Return Value

string[]

at line 92
string[] readAndWrite(bool $blocking, bool $close = false)

Reads data in file handles and pipes.

Parameters

bool $blocking Whether to use blocking calls or not
bool $close Whether to close pipes if they've reached EOF

Return Value

string[] An array of read data indexed by their fd

at line 141
bool haveReadSupport()

Returns if pipes are able to read output.

Return Value

bool

at line 149
bool areOpen()

Returns if the current state has open file handles or pipes.

Return Value

bool