annotate vendor/psy/psysh/src/Readline/Readline.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 5fb285c0d0e3
children
rev   line source
Chris@13 1 <?php
Chris@13 2
Chris@13 3 /*
Chris@13 4 * This file is part of Psy Shell.
Chris@13 5 *
Chris@13 6 * (c) 2012-2018 Justin Hileman
Chris@13 7 *
Chris@13 8 * For the full copyright and license information, please view the LICENSE
Chris@13 9 * file that was distributed with this source code.
Chris@13 10 */
Chris@13 11
Chris@13 12 namespace Psy\Readline;
Chris@13 13
Chris@13 14 /**
Chris@13 15 * An interface abstracting the various readline_* functions.
Chris@13 16 */
Chris@13 17 interface Readline
Chris@13 18 {
Chris@13 19 /**
Chris@13 20 * Check whether this Readline class is supported by the current system.
Chris@13 21 *
Chris@13 22 * @return bool
Chris@13 23 */
Chris@13 24 public static function isSupported();
Chris@13 25
Chris@13 26 /**
Chris@13 27 * Add a line to the command history.
Chris@13 28 *
Chris@13 29 * @param string $line
Chris@13 30 *
Chris@13 31 * @return bool Success
Chris@13 32 */
Chris@13 33 public function addHistory($line);
Chris@13 34
Chris@13 35 /**
Chris@13 36 * Clear the command history.
Chris@13 37 *
Chris@13 38 * @return bool Success
Chris@13 39 */
Chris@13 40 public function clearHistory();
Chris@13 41
Chris@13 42 /**
Chris@13 43 * List the command history.
Chris@13 44 *
Chris@13 45 * @return array
Chris@13 46 */
Chris@13 47 public function listHistory();
Chris@13 48
Chris@13 49 /**
Chris@13 50 * Read the command history.
Chris@13 51 *
Chris@13 52 * @return bool Success
Chris@13 53 */
Chris@13 54 public function readHistory();
Chris@13 55
Chris@13 56 /**
Chris@13 57 * Read a single line of input from the user.
Chris@13 58 *
Chris@13 59 * @param null|string $prompt
Chris@13 60 *
Chris@13 61 * @return false|string
Chris@13 62 */
Chris@13 63 public function readline($prompt = null);
Chris@13 64
Chris@13 65 /**
Chris@13 66 * Redraw readline to redraw the display.
Chris@13 67 */
Chris@13 68 public function redisplay();
Chris@13 69
Chris@13 70 /**
Chris@13 71 * Write the command history to a file.
Chris@13 72 *
Chris@13 73 * @return bool Success
Chris@13 74 */
Chris@13 75 public function writeHistory();
Chris@13 76 }