Phpcraft
|
Public Member Functions | |
__construct (string $title) | |
add (string $message) | |
render () | |
setInputPrefix (string $input_prefix) | |
append (string $appendix) | |
Public Member Functions inherited from Phpcraft\UserInterface | |
__construct ($title=null) | |
Public Attributes | |
$tabcomplete_function = null | |
Phpcraft\FancyUserInterface::__construct | ( | string | $title | ) |
Note that from this point forward, STDIN and STDOUT are in the hands of the UI with no way out. Make sure to register a "stdin_line" event handler with pas if you'd like input to work. A render loop will be registered with pas, but you may still call ::render if you need immediate rendering. For PHP <7.2.0 and Windows <10.0.10586, use the PlainUserInterface.
string | $title | The title that the terminal window will be given. |
Phpcraft\FancyUserInterface::add | ( | string | $message | ) |
Adds a message to be printed on the user interface.
string | $message |
Reimplemented from Phpcraft\UserInterface.
Phpcraft\FancyUserInterface::append | ( | string | $appendix | ) |
Appends to the last message.
string | $appendix |
Reimplemented from Phpcraft\UserInterface.
Phpcraft\FancyUserInterface::render | ( | ) |
Renders the UI immediately.
Reimplemented from Phpcraft\UserInterface.
Phpcraft\FancyUserInterface::setInputPrefix | ( | string | $input_prefix | ) |
Sets the string displayed before the user's input
string | $input_prefix |
callable Phpcraft\FancyUserInterface::$tabcomplete_function = null |
The function called when the user presses the tabulator key with the currently selected word as parameter. The return should be an array of possible completions.