Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe ColorStyle

Fonctions membres publiques

 __construct ($fg='', $bg='', $options=array())
 
 __toString ()
 
 getStyle ()
 
 getKnownColors ()
 
 getKnownOptions ()
 

Fonctions membres publiques statiques

static fromString ($string)
 

Attributs privés

 $fgColor = 0
 
 $bgColor = 0
 
 $options = array()
 

Attributs privés statiques

static $knownColors
 
static $knownOptions
 
static $fgBase = 30
 
static $bgBase = 40
 

Description détaillée

Class ColorStyle

Depuis
1.0
Obsolète:
2.0 Use the joomla/console package instead

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $fg = '',
  $bg = '',
  $options = array() 
)

Constructor

Paramètres
string$fgForeground color.
string$bgBackground color.
array$optionsStyle options.
Depuis
1.0
Exceptions

Références $option, ColorStyle\$options, ColorStyle\getKnownColors(), et ColorStyle\getKnownOptions().

Documentation des fonctions membres

◆ __toString()

__toString ( )

Convert to a string.

Renvoie
string
Depuis
1.0

Références ColorStyle\getStyle().

◆ fromString()

static fromString (   $string)
static

Create a color style from a parameter string.

Example: fg=red;bg=blue;options=bold,blink

Paramètres
string$stringThe parameter string.
Renvoie
ColorStyle Instance of $this to allow chaining.
Depuis
1.0
Exceptions

Références ColorStyle\$options, $parts, et Input\count().

Référencé par ColorProcessor\process().

◆ getKnownColors()

getKnownColors ( )

Get the known colors.

Renvoie
string
Depuis
1.0

Référencé par ColorStyle\__construct().

◆ getKnownOptions()

getKnownOptions ( )

Get the known options.

Renvoie
array
Depuis
1.0

Référencé par ColorStyle\__construct().

◆ getStyle()

getStyle ( )

Get the translated color code.

Renvoie
string
Depuis
1.0

Références ColorStyle\$bgColor, ColorStyle\$fgColor, et $option.

Référencé par ColorStyle\__toString().

Documentation des champs

◆ $bgBase

$bgBase = 40
staticprivate

◆ $bgColor

$bgColor = 0
private

Référencé par ColorStyle\getStyle().

◆ $fgBase

$fgBase = 30
staticprivate

◆ $fgColor

$fgColor = 0
private

Référencé par ColorStyle\getStyle().

◆ $knownColors

$knownColors
staticprivate
Valeur initiale :
= array(
'black' => 0,
'red' => 1,
'green' => 2,
'yellow' => 3,
'blue' => 4,
'magenta' => 5,
'cyan' => 6,
'white' => 7,
)

◆ $knownOptions

$knownOptions
staticprivate
Valeur initiale :
= array(
'bold' => 1,
'underscore' => 4,
'blink' => 5,
'reverse' => 7,
)

◆ $options

$options = array()
private

La documentation de cette classe a été générée à partir du fichier suivant :