Index

UnixPipes

MMO\core\server · 1 symbol · generated 5 Oct 2026

class

UnixPipes

internalUnixPipes.php:16

UnixPipes implementation uses unix pipes as handles.

class MMO\core\server\UnixPipes extends MMO\core\classes\aPipes
Namespace
MMO\core\server
Extends
aPipes
Author
Romain Neutron <imprec@gmail.com>
NOTE: adapted from Symfony's `Process\Pipes\UnixPipes` (same original author) -- [`Process`](https://mcp.mmoframework.fr/documentation/mmo.core/php/server/Process.md#process) is the only real consumer; used internally, not meant to be constructed directly.

Properties3

haveReadSupport

protected $haveReadSupport = null

ptyMode

protected $ptyMode = null

ttyMode

protected $ttyMode = null

Methods6

haveReadSupport()

UnixPipes.php:39
function haveReadSupport(): bool
returnsboolwhether stdout/stderr are actually being captured (see __construct's $haveReadSupport).

readAndWrite($blocking, $close)

UnixPipes.php:94

Write any pending input, then read whatever's currently available from stdout/stderr.

function readAndWrite(bool $blocking, bool $close = false): array
$blockingboolif true, wait up to aPipes::TIMEOUT_PRECISION for data; if false, return immediately with whatever's ready.
$close = falseboolif true, keep reading each pipe until EOF (and close it), instead of just one chunk.
returnsarraypipe type => newly read data.

__construct($ttyMode, $ptyMode, $input, $haveReadSupport)

UnixPipes.php:30
function __construct(?bool $ttyMode, bool $ptyMode, $input, bool $haveReadSupport)
$ttyModenull | bool
$ptyModebool
$inputthe process's stdin content/stream (see aPipes::__construct).
$haveReadSupportboolwhether stdout/stderr should actually be captured (if false, they're redirected to /dev/null).
Inherited members (10)
ConstantsDeclared byDescription
CHUNK_SIZEaPipesChunk size (bytes) used when streaming a resource/iterator input to the subprocess.
TIMEOUT_PRECISIONaPipes
PropertiesDeclared byDescription
blockedaPipes
inputaPipes
inputBufferaPipes
pipesaPipes
MethodsDeclared byDescription
close()aPipesClose every open pipe.
unblock()aPipesSwitch every pipe (and the input resource, if any) to non-blocking mode, so reads/writes never stall waiting on the subprocess.
write()aPipesWrite as much of the pending input to the subprocess's stdin (pipe 0) as it will currently accept without blocking, then return.
__destruct()aPipes