annotate vendor/psy/psysh/src/Readline/Readline.php @ 5:12f9dff5fda9 tip

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