Documentations › mmo.core › php › server UnixPipes MMO\core\server · 1 symbol · generated 30 Sep 2026
UnixPipes implementation uses unix pipes as handles.
class MMO\core\server\UnixPipes extends MMO\core\classes\aPipes Namespace MMO\core\serverExtends aPipes Author Romain Neutron <imprec@gmail.com> NOTE: adapted from Symfony's `Process\Pipes\UnixPipes` (same original author) -- [`Process`](https://mmoframework.fr/documentation/mmo.core/php/server/Process.md#process) is the only
real consumer; used internally, not meant to be constructed directly. Properties3 protected $haveReadSupport = null protected $ptyMode = null protected $ttyMode = null Methods6 function areOpen(): bool returns bool whether any pipe is still open.
function getDescriptors(): array function getFiles(): array returns array always empty -- unlike WindowsPipes , unix pipes need no temporary backing files.
function haveReadSupport(): bool returns bool whether stdout/stderr are actually being captured (see __construct 's $haveReadSupport).
Write any pending input, then read whatever's currently available from stdout/stderr.
function readAndWrite(bool $blocking, bool $close = false): array $blocking bool if true, wait up to aPipes::TIMEOUT_PRECISION for data; if false, return immediately with whatever's ready. $close = false bool if true, keep reading each pipe until EOF (and close it), instead of just one chunk. returns array pipe type => newly read data.
function __construct(?bool $ttyMode, bool $ptyMode, $input, bool $haveReadSupport) $ttyMode null | bool $ptyMode bool $input the process's stdin content/stream (see aPipes::__construct ). $haveReadSupport bool whether stdout/stderr should actually be captured (if false, they're redirected to /dev/null).
Inherited members (10) Constants Declared by Description CHUNK_SIZEaPipes Chunk size (bytes) used when streaming a resource/iterator input to the subprocess. TIMEOUT_PRECISIONaPipes
Methods Declared by Description close()aPipes Close every open pipe. unblock()aPipes Switch every pipe (and the input resource, if any) to non-blocking mode, so reads/writes never stall waiting on the subprocess. write()aPipes Write as much of the pending input to the subprocess's stdin (pipe 0) as it will currently accept without blocking, then return. __destruct()aPipes