interface PipesInterface

PipesInterface manages descriptors and pipes for the use of proc_open.

Constants

CHUNK_SIZE

Methods

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
areOpen()

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

close()

Closes file handles and pipes.

Details

at line line 30
array getDescriptors()

Returns an array of descriptors for the use of proc_open.

Return Value

array

at line line 37
string[] getFiles()

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

Return Value

string[]

at line line 47
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 line 54
bool areOpen()

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

Return Value

bool

at line line 59
close()

Closes file handles and pipes.