ColorStyle
Class ColorStyle
final deprecated
since |
1.0 |
---|---|
deprecated |
2.0 Use the |
Methods
__construct
Constructor
__construct(string $fg = '', string $bg = '', array $options = array())
since |
1.0 |
---|---|
throws |
|
Arguments
- $fg
string
Foreground color.- $bg
string
Background color.- $options
array
Style options.
__toString
Convert to a string.
__toString() : string
since |
1.0 |
---|
Response
string
fromString
Create a color style from a parameter string.
fromString(string $string) : \Joomla\Application\Cli\ColorStyle
static
Example: fg=red;bg=blue;options=bold,blink
since |
1.0 |
---|---|
throws |
|
Arguments
- $string
string
The parameter string.
Response
\Joomla\Application\Cli\ColorStyle
Instance of $this to allow chaining.
getKnownColors
Get the known colors.
getKnownColors() : string
since |
1.0 |
---|
Response
string
getKnownOptions
Get the known options.
getKnownOptions() : array
since |
1.0 |
---|
Response
array
getStyle
Get the translated color code.
getStyle() : string
since |
1.0 |
---|
Response
string
Properties
knownColors
Known colors
static
since |
1.0 |
---|
Type(s)
array
knownOptions
Known styles
static
since |
1.0 |
---|
Type(s)
array
fgBase
Foreground base value
static
since |
1.0 |
---|
Type(s)
integer
bgBase
Background base value
static
since |
1.0 |
---|
Type(s)
integer
fgColor
Foreground color
since |
1.0 |
---|
Type(s)
integer
bgColor
Background color
since |
1.0 |
---|
Type(s)
integer
options
Array of style options
since |
1.0 |
---|
Type(s)
array