4 * This file is part of Psy Shell.
6 * (c) 2012-2018 Justin Hileman
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Psy\Readline;
15 * An interface abstracting the various readline_* functions.
20 * Check whether this Readline class is supported by the current system.
24 public static function isSupported();
27 * Add a line to the command history.
31 * @return bool Success
33 public function addHistory($line);
36 * Clear the command history.
38 * @return bool Success
40 public function clearHistory();
43 * List the command history.
47 public function listHistory();
50 * Read the command history.
52 * @return bool Success
54 public function readHistory();
57 * Read a single line of input from the user.
59 * @param null|string $prompt
61 * @return false|string
63 public function readline($prompt = null);
66 * Redraw readline to redraw the display.
68 public function redisplay();
71 * Write the command history to a file.
73 * @return bool Success
75 public function writeHistory();