diff options
author | Andrew Dolgov <[email protected]> | 2022-07-12 22:26:21 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-07-12 22:26:21 +0300 |
commit | 80d3db1dcf8fe9ca66d4e3f2e2116d3bc39ae2b4 (patch) | |
tree | 04b33bfb9c9368c4a31e287153abec690b9014e0 /vendor/thecodingmachine/safe/generated/readline.php | |
parent | 4b6161892000cb2b8392dce92a9cf2cabdf2d20e (diff) |
upgrade idiorm to php8.1-patched version (aaronpk/idiorm)
Diffstat (limited to 'vendor/thecodingmachine/safe/generated/readline.php')
-rw-r--r-- | vendor/thecodingmachine/safe/generated/readline.php | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/vendor/thecodingmachine/safe/generated/readline.php b/vendor/thecodingmachine/safe/generated/readline.php index a1c52c755..ddbf5a354 100644 --- a/vendor/thecodingmachine/safe/generated/readline.php +++ b/vendor/thecodingmachine/safe/generated/readline.php @@ -7,14 +7,14 @@ use Safe\Exceptions\ReadlineException; /** * This function adds a line to the command line history. * - * @param string $line The line to be added in the history. + * @param string $prompt The line to be added in the history. * @throws ReadlineException * */ -function readline_add_history(string $line): void +function readline_add_history(string $prompt): void { error_clear_last(); - $result = \readline_add_history($line); + $result = \readline_add_history($prompt); if ($result === false) { throw ReadlineException::createFromPhpError(); } @@ -32,38 +32,6 @@ function readline_add_history(string $line): void * stream_select as it allows interleaving of IO and * user input, unlike readline. * - * - * Readline Callback Interface Example - * - * 10) { - * $prompting = false; - * readline_callback_handler_remove(); - * } else { - * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback'); - * } - * } - * - * $c = 1; - * $prompting = true; - * - * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback'); - * - * while ($prompting) { - * $w = NULL; - * $e = NULL; - * $n = stream_select($r = array(STDIN), $w, $e, null); - * if ($n && in_array(STDIN, $r)) { - * // read a character, will call the callback when a newline is entered - * readline_callback_read_char(); - * } - * } - * - * echo "Prompting disabled. All done.\n"; - * ?> - * ]]> - * - * - * * @param string $prompt The prompt message. * @param callable $callback The callback function takes one parameter; the * user input returned. @@ -100,15 +68,15 @@ function readline_clear_history(): void * This function registers a completion function. This is the same kind of * functionality you'd get if you hit your tab key while using Bash. * - * @param callable $function You must supply the name of an existing function which accepts a + * @param callable $callback You must supply the name of an existing function which accepts a * partial command line and returns an array of possible matches. * @throws ReadlineException * */ -function readline_completion_function(callable $function): void +function readline_completion_function(callable $callback): void { error_clear_last(); - $result = \readline_completion_function($function); + $result = \readline_completion_function($callback); if ($result === false) { throw ReadlineException::createFromPhpError(); } |