CLI
class CLI
Class to facilitate command-line output.
Support less-trivial output stuff such as colours (on xterm-color)
Methods
static
supports_colour()
Returns true if the current STDOUT supports the use of colour control codes.
static string
text(string $text, string $fgColour = null, string $bgColour = null, bool $bold = false)
Return text encoded for CLI output, optionally coloured
static string
start_colour(string $fgColour = null, string $bgColour = null, bool $bold = false)
Send control codes for changing text to the given colour
static
end_colour()
Send control codes for returning to normal colour
Details
at line 14
static
supports_colour()
Returns true if the current STDOUT supports the use of colour control codes.
at line 38
static string
text(string $text, string $fgColour = null, string $bgColour = null, bool $bold = false)
Return text encoded for CLI output, optionally coloured
at line 63
static string
start_colour(string $fgColour = null, string $bgColour = null, bool $bold = false)
Send control codes for changing text to the given colour
at line 99
static
end_colour()
Send control codes for returning to normal colour