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 ColorProcessor
+ Graphe d'héritage de ColorProcessor:

Fonctions membres publiques

 __construct ($noColors=null)
 
 addStyle ($name, ColorStyle $style)
 
 process ($string)
 

Fonctions membres publiques statiques

static stripColors ($string)
 

Champs de données

 $noColors = false
 

Attributs protégés

 $tagFilter = '/<([a-z=;]+)>(.*?)<\/\\1>/s'
 
 $styles = array()
 

Attributs protégés statiques

static $stripFilter = '/<[\/]?[a-z=;]+>/'
 

Fonctions membres privées

 replaceColors ($text, $tag, $match, Colorstyle $style)
 
 addPredefinedStyles ()
 

Description détaillée

Class ColorProcessor.

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

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $noColors = null)

Class constructor

Paramètres
boolean$noColorsDefines non-colored mode on construct
Depuis
1.1.0

Références ColorProcessor\$noColors, ColorProcessor\addPredefinedStyles(), et null.

Documentation des fonctions membres

◆ addPredefinedStyles()

addPredefinedStyles ( )
private

Adds predefined color styles to the ColorProcessor object

Renvoie
Stdout Instance of $this to allow chaining.
Depuis
1.0

Références ColorProcessor\addStyle().

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

◆ addStyle()

addStyle (   $name,
ColorStyle  $style 
)

Add a style.

Paramètres
string$nameThe style name.
ColorStyle$styleThe color style.
Renvoie
ColorProcessor Instance of $this to allow chaining.
Depuis
1.0

Références $name, et $style.

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

◆ process()

process (   $string)

Process a string.

Paramètres
string$stringThe string to process.
Renvoie
string
Depuis
1.0

Implémente ProcessorInterface.

Références $i, elseif, ColorStyle\fromString(), et ColorProcessor\replaceColors().

◆ replaceColors()

replaceColors (   $text,
  $tag,
  $match,
Colorstyle  $style 
)
private

Replace color tags in a string.

Paramètres
string$textThe original text.
string$tagThe matched tag.
string$matchThe match.
ColorStyle$styleThe color style to apply.
Renvoie
string
Depuis
1.0

Références $style, et $text.

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

◆ stripColors()

static stripColors (   $string)
static

Strip color tags from a string.

Paramètres
string$stringThe string.
Renvoie
string
Depuis
1.0

Documentation des champs

◆ $noColors

$noColors = false

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

◆ $stripFilter

$stripFilter = '/<[\/]?[a-z=;]+>/'
staticprotected

◆ $styles

$styles = array()
protected

◆ $tagFilter

$tagFilter = '/<([a-z=;]+)>(.*?)<\/\\1>/s'
protected

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