diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-12-10 05:22:37 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-12-10 05:22:37 +0000 |
| commit | 0ef2dd7175248e1116a867e0a86579d9f6ca16eb (patch) | |
| tree | 452fc6e3391544b209ea075d587935e7ab42e714 /vendor/thecodingmachine/safe/generated/readline.php | |
| parent | f15db7b9610467aa29f6441361fdc4e6c90deaa1 (diff) | |
| parent | 3860435cba19cf2cd9c86dcc5d8938198c6b6736 (diff) | |
Merge branch 'feature/alpine_3.21-and-php_8.4' into 'master'
Bump to Alpine 3.21 and PHP 8.4, raise the minimum to PHP 8.2
See merge request tt-rss/tt-rss!85
Diffstat (limited to 'vendor/thecodingmachine/safe/generated/readline.php')
| -rw-r--r-- | vendor/thecodingmachine/safe/generated/readline.php | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/vendor/thecodingmachine/safe/generated/readline.php b/vendor/thecodingmachine/safe/generated/readline.php deleted file mode 100644 index ddbf5a354..000000000 --- a/vendor/thecodingmachine/safe/generated/readline.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -namespace Safe; - -use Safe\Exceptions\ReadlineException; - -/** - * This function adds a line to the command line history. - * - * @param string $prompt The line to be added in the history. - * @throws ReadlineException - * - */ -function readline_add_history(string $prompt): void -{ - error_clear_last(); - $result = \readline_add_history($prompt); - if ($result === false) { - throw ReadlineException::createFromPhpError(); - } -} - - -/** - * Sets up a readline callback interface then prints - * prompt and immediately returns. - * Calling this function twice without removing the previous - * callback interface will automatically and conveniently overwrite the old - * interface. - * - * The callback feature is useful when combined with - * stream_select as it allows interleaving of IO and - * user input, unlike readline. - * - * @param string $prompt The prompt message. - * @param callable $callback The callback function takes one parameter; the - * user input returned. - * @throws ReadlineException - * - */ -function readline_callback_handler_install(string $prompt, callable $callback): void -{ - error_clear_last(); - $result = \readline_callback_handler_install($prompt, $callback); - if ($result === false) { - throw ReadlineException::createFromPhpError(); - } -} - - -/** - * This function clears the entire command line history. - * - * @throws ReadlineException - * - */ -function readline_clear_history(): void -{ - error_clear_last(); - $result = \readline_clear_history(); - if ($result === false) { - throw ReadlineException::createFromPhpError(); - } -} - - -/** - * 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 $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 $callback): void -{ - error_clear_last(); - $result = \readline_completion_function($callback); - if ($result === false) { - throw ReadlineException::createFromPhpError(); - } -} - - -/** - * This function reads a command history from a file. - * - * @param string $filename Path to the filename containing the command history. - * @throws ReadlineException - * - */ -function readline_read_history(string $filename = null): void -{ - error_clear_last(); - if ($filename !== null) { - $result = \readline_read_history($filename); - } else { - $result = \readline_read_history(); - } - if ($result === false) { - throw ReadlineException::createFromPhpError(); - } -} - - -/** - * This function writes the command history to a file. - * - * @param string $filename Path to the saved file. - * @throws ReadlineException - * - */ -function readline_write_history(string $filename = null): void -{ - error_clear_last(); - if ($filename !== null) { - $result = \readline_write_history($filename); - } else { - $result = \readline_write_history(); - } - if ($result === false) { - throw ReadlineException::createFromPhpError(); - } -} |