From 5d3fd7332510b304a31e713c67ca4fed03e6f5b4 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 22 Aug 2019 22:58:19 +0200 Subject: [PATCH] Add stdinbuffer --- lib/functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/functions.php b/lib/functions.php index c627c3b..8798db1 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -137,6 +137,16 @@ function getStdinLineReader(): LineReader return $stream; } +/** + * Get data eventually buffered by the STDIN LineReader + * + * @return LineReader + */ +function getStdinBuffer(): string +{ + return getStdinLineReader()->getBuffer(); +} + /** * The STDOUT stream for the process associated with the currently active event loop. *