ConsoleReaderChildProcessUtils
Constants
TOKEN_DELIMITER
php
public const TOKEN_DELIMITER = ":"TOKEN_HASH_ALGO
php
public const TOKEN_HASH_ALGO = "xxh3"Methods
createMessage()
php
public static function createMessage(string $line, int &$counter) : stringCreates an IPC message to transmit a user's input command to the parent process.
Unfortunately we can't currently provide IPC pipes other than stdout/stderr to subprocesses on Windows, so this adds a hash of the user input (with a counter as salt) to prevent unintended process output (like error messages) from being treated as user input.
parseMessage()
php
public static function parseMessage(string $message, int &$counter) : ?stringExtracts a command from an IPC message from the console reader subprocess. Returns the user's input command, or null if this isn't a user input.
