Download the PHP package fyre/console without Composer
On this page you can find all versions of the php package fyre/console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package console
FyreConsole
FyreConsole is a free, open-source CLI library for PHP.
Table Of Contents
- Installation
- Methods
- Colors
- Foreground
- Background
Installation
Using Composer
In PHP:
Methods
Color
Color a string for terminal output, preserving existing colors.
$text
is a string representing the text.$options
is an array containing the color options.foreground
is a string representing the foreground color.background
is a string representing the background color.underline
is a boolean indicating whether to underline the text, and will default to false.
Error
Output text to STDERR.
$text
is a string representing the text.$options
is an array containing the color options.foreground
is a string representing the foreground color, and will default to "light_red".background
is a string representing the background color.underline
is a boolean indicating whether to underline the text, and will default to false.
Get Height
Get the terminal height (in characters).
Get Width
Get the terminal width (in characters).
Input
Read a line of input.
$prefix
is a string representing the prefix, and will default to "".
Progress
Output a progress indicator.
$step
is a number representing the current step, and will default to null.$totalSteps
is a number representing the total steps, and will default to 10.
Sequential calls to this method will update the progress indicator. If the $step
is set to null the indicator will be cleared.
Table
Output a table.
$data
is an array containing the table rows.$header
is an array containing the table header columns, and will default to [].
Write
Output text to STDOUT.
$text
is a string representing the text.$options
is an array containing the color options.foreground
is a string representing the foreground color.background
is a string representing the background color.underline
is a boolean indicating whether to underline the text, and will default to false.
Colors
Foreground
- "black"
- "red"
- "green"
- "yellow"
- "blue"
- "purple"
- "cyan"
- "light_gray"
- "dark_gray"
- "light_red"
- "light_green"
- "light_yellow"
- "light_blue"
- "light_purple"
- "light_cyan"
- "white"
Background
- "black"
- "red"
- "green"
- "yellow"
- "blue"
- "purple"
- "cyan"
- "light_gray"
All versions of console with dependencies
PHP Build Version
Package Version
No informations.
The package fyre/console contains the following files
Loading the files please wait ....