Index

WindowsPipes

MMO\core\server · 1 symbol · generated 30 Sep 2026

class

WindowsPipes

internalWindowsPipes.php:22

WindowsPipes implementation uses temporary files as handles.

class MMO\core\server\WindowsPipes extends MMO\core\classes\aPipes
Namespace
MMO\core\server
Extends
aPipes
See
https://bugs.php.net/51800, https://bugs.php.net/65650
Author
Romain Neutron <imprec@gmail.com>
NOTE: adapted from Symfony's `Process\Pipes\WindowsPipes` (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. Windows-only; not exercisable/testable on this (Linux) development environment.

Index

fileHandles
files
haveReadSupport
lockHandles
readBytes
areOpen()
close()Close every remaining file handle/lock (in addition to aPipes::close's own pipe cleanup).
getDescriptors()
getFiles()
haveReadSupport()
readAndWrite($blocking, $close)Write any pending input, then read whatever's newly appeared in stdout/stderr's backing temp files ($readBytes tracks how much of each has already been read).
__construct($input, $haveReadSupport)

Properties5

fileHandles

protected $fileHandles = []

files

protected $files = []

haveReadSupport

protected $haveReadSupport = null

lockHandles

protected $lockHandles = []

readBytes

protected $readBytes = [1 => 0, 2 => 0]

Methods7

getDescriptors()

WindowsPipes.php:94
function getDescriptors(): array
returnsarraythe proc_open() descriptor spec: stdin as a pipe, stdout/stderr redirected to NUL (actual output is captured via the temp files instead -- see the class docblock and getFiles).

getFiles()

WindowsPipes.php:116
function getFiles(): array
returnsarraypipe type => the temporary file its output is being written to (see the class docblock).

haveReadSupport()

WindowsPipes.php:83
function haveReadSupport(): bool
returnsboolwhether stdout/stderr are actually being captured.

readAndWrite($blocking, $close)

WindowsPipes.php:127

Write any pending input, then read whatever's newly appeared in stdout/stderr's backing temp files ($readBytes tracks how much of each has already been read).

function readAndWrite(bool $blocking, bool $close = false): array
$blockingboolif true, wait up to aPipes::TIMEOUT_PRECISION for new data.
$close = falseboolif true, also truncate/close each file and release its lock.
returnsarraypipe type => newly read data.

__construct($input, $haveReadSupport)

WindowsPipes.php:41
function __construct($input, bool $haveReadSupport)
$inputthe process's stdin content/stream (see aPipes::__construct).
$haveReadSupportboolwhether stdout/stderr should actually be captured (via temp files -- see the class docblock).
Inherited members (9)
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
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