W3cubDocs

/Symfony 4.1

UnixPipes

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

Closes file handles and pipes.

from AbstractPipes
bool hasSystemCallBeenInterrupted()

Returns true if a system call has been interrupted.

from AbstractPipes
unblock()

Unblocks streams.

from AbstractPipes
write()

Writes input to stdin.

from AbstractPipes
handleError($type, $msg) from AbstractPipes
__destruct()
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

__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

close()

Closes file handles and pipes.

protected bool hasSystemCallBeenInterrupted()

Returns true if a system call has been interrupted.

Return Value

bool

protected unblock()

Unblocks streams.

protected write()

Writes input to stdin.

Exceptions

InvalidArgumentException When an input iterator yields a non supported value

handleError($type, $msg)

Parameters

$type
$msg

__destruct()

array getDescriptors()

Returns an array of descriptors for the use of proc_open.

Return Value

array

string[] getFiles()

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

Return Value

string[]

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

bool haveReadSupport()

Returns if pipes are able to read output.

Return Value

bool

bool areOpen()

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

Return Value

bool

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Process/Pipes/UnixPipes.html