ColorStyle
Class defining ANSI-color styles for command line output
final deprecated
since |
4.0.0 |
---|---|
deprecated |
5.0 Use the |
package |
Joomla CMS |
Methods
__construct
Constructor
__construct(string fg = '', string bg = '', array options = []) : mixed
since |
4.0.0 |
---|---|
throws |
|
Arguments
- fg
string
Foreground color.- bg
string
Background color.- options
array
Style options.
Response
mixed
__toString
Convert to a string.
__toString() : string
since |
4.0.0 |
---|
Response
string
fromString
Create a color style from a parameter string.
fromString(string string) : $this
static
Example: fg=red;bg=blue;options=bold,blink
since |
4.0.0 |
---|---|
throws |
|
Arguments
- string
string
The parameter string.
Response
$this
getKnownColors
Get the known colors.
getKnownColors() : string[]
since |
4.0.0 |
---|
Response
string[]
getKnownOptions
Get the known options.
getKnownOptions() : string[]
since |
4.0.0 |
---|
Response
string[]
getStyle
Get the translated color code.
getStyle() : string
since |
4.0.0 |
---|
Response
string