helpers\BaseConsole moveCursorDown()

moveCursorDown() public static method Moves the terminal cursor down by sending ANSI control code CUD to the terminal. If the cursor is already at the edge of the screen, this has no effect. public static void moveCursorDown ( $rows = 1 )$rows integer Number of rows the cursor should be moved down

helpers\BaseConsole moveCursorBackward()

moveCursorBackward() public static method Moves the terminal cursor backward by sending ANSI control code CUB to the terminal. If the cursor is already at the edge of the screen, this has no effect. public static void moveCursorBackward ( $steps = 1 )$steps integer Number of steps the cursor should be moved backward

helpers\BaseConsole markdownToAnsi()

markdownToAnsi() public static method Converts Markdown to be better readable in console environments by applying some ANSI format public static string markdownToAnsi ( $markdown )$markdown string The markdown string. return string The parsed result as ANSI formatted string.

helpers\BaseConsole isRunningOnWindows()

isRunningOnWindows() public static method Returns true if the console is running on windows public static boolean isRunningOnWindows ( )

helpers\BaseConsole input()

input() public static method Asks the user for input. Ends when the user types a carriage return (PHP_EOL). Optionally, It also provides a prompt. public static string input ( $prompt = null )$prompt string The prompt to display before waiting for input (optional) return string The user's input

helpers\BaseConsole hideCursor()

hideCursor() public static method Hides the cursor by sending ANSI DECTCEM code ?25l to the terminal. Use showCursor() to bring it back. Do not forget to show cursor when your application exits. Cursor might stay hidden in terminal after exit. public static void hideCursor ( )

helpers\BaseConsole getScreenSize()

getScreenSize() public static method Usage: list($width, $height) = ConsoleHelper::getScreenSize(); public static array|boolean getScreenSize ( $refresh = false )$refresh boolean Whether to force checking and not re-use cached size value. This is useful to detect changing window size while the application is running but may not get up to date values on every terminal. return array|boolean An array of ($width, $height) or false when it was not able to determine size.

helpers\BaseConsole escape()

escape() public static method Escapes % so they don't get interpreted as color codes when the string is parsed by renderColoredString() public static string escape ( $string )$string string String to escape

helpers\BaseConsole error()

error() public static method Prints text to STDERR appended with a carriage return (PHP_EOL). public static integer|boolean error ( $string = null )$string string The text to print return integer|boolean Number of bytes printed or false on error.

helpers\BaseConsole endProgress()

endProgress() public static method Ends a progress bar that has been started by startProgress(). See also: startProgress() updateProgress() public static void endProgress ( $remove = false, $keepPrefix = true )$remove string|boolean This can be false to leave the progress bar on screen and just print a newline. If set to true, the line of the progress bar will be cleared. This may also be a string to be displayed instead of the progress bar. $keepPrefix boolean Whether to keep the pr