helpers\BaseConsole stripAnsiFormat()

stripAnsiFormat() public static method Strips ANSI control codes from a string public static string stripAnsiFormat ( $string )$string string String to strip

helpers\BaseConsole streamSupportsAnsiColors()

streamSupportsAnsiColors() public static method Returns true if the stream supports colorization. ANSI colors are disabled if not supported by the stream. windows without ansicon not tty consoles public static boolean streamSupportsAnsiColors ( $stream )$stream mixed return boolean True if the stream supports ANSI colors, otherwise false.

helpers\BaseConsole stdout()

stdout() public static method Prints a string to STDOUT. public static integer|boolean stdout ( $string )$string string The string to print return integer|boolean Number of bytes printed or false on error

helpers\BaseConsole stdin()

stdin() public static method Gets input from STDIN and returns a string right-trimmed for EOLs. public static string stdin ( $raw = false )$raw boolean If set to true, returns the raw string without trimming return string The string read from stdin

helpers\BaseConsole stderr()

stderr() public static method Prints a string to STDERR. public static integer|boolean stderr ( $string )$string string The string to print return integer|boolean Number of bytes printed or false on error

helpers\BaseConsole startProgress()

startProgress() public static method Starts display of a progress bar on screen. This bar will be updated by updateProgress() and my be ended by endProgress(). The following example shows a simple usage of a progress bar: Console::startProgress(0, 1000); for ($n = 1; $n <= 1000; $n++) { usleep(1000); Console::updateProgress($n, 1000); } Console::endProgress(); Git clone like progress (showing only status information): `php Console::startProgress(0, 1000, 'Counting objects: ', fa

helpers\BaseConsole showCursor()

showCursor() public static method Will show a cursor again when it has been hidden by hideCursor() by sending ANSI DECTCEM code ?25h to the terminal. public static void showCursor ( )

helpers\BaseConsole select()

select() public static method Gives the user an option to choose from. Giving '?' as an input will show a list of options to choose from and their explanations. public static string select ( $prompt, $options = [] )$prompt string The prompt message $options array Key-value array of options to choose from return string An option character the user chose

helpers\BaseConsole scrollUp()

scrollUp() public static method Scrolls whole page up by sending ANSI control code SU to the terminal. New lines are added at the bottom. This is not supported by ANSI.SYS used in windows. public static void scrollUp ( $lines = 1 )$lines integer Number of lines to scroll up

helpers\BaseConsole scrollDown()

scrollDown() public static method Scrolls whole page down by sending ANSI control code SD to the terminal. New lines are added at the top. This is not supported by ANSI.SYS used in windows. public static void scrollDown ( $lines = 1 )$lines integer Number of lines to scroll down