ColorProcessor
Implements ProcessorInterfaceCommand line output processor supporting ANSI-colored output
deprecated
since |
4.0.0 |
---|---|
deprecated |
4.3 will be removed in 6.0
Use the |
package |
Joomla CMS |
Methods
__construct
Class constructor
__construct( noColors = null) :
since |
4.0.0 |
---|
Arguments
- noColors
bool
Defines non-colored mode on construct
Response
mixed
addPredefinedStyles
Adds predefined color styles to the ColorProcessor object
addPredefinedStyles() :
since |
4.0.0 |
---|
Response
$this
addStyle
Add a style.
addStyle( name, \Joomla\CMS\Application\CLI\ColorStyle style) :
process
Process a string.
process( string) :
since |
4.0.0 |
---|
Arguments
- string
string
The string to process.
Response
string
replaceColors
Replace color tags in a string.
replaceColors( text, tag, match, \Joomla\CMS\Application\CLI\ColorStyle style) :
since |
4.0.0 |
---|
Arguments
- text
string
The original text.- tag
string
The matched tag.- match
string
The match.- style
ColorStyle
The color style to apply.
Response
mixed
stripColors
Strip color tags from a string.
stripColors( string) :
static
since |
4.0.0 |
---|
Arguments
- string
string
The string.
Response
string
Properties
noColors
Flag to remove color codes from the output
since |
4.0.0 |
---|
Type(s)
bool
tagFilter
Regex to match tags
since |
4.0.0 |
---|
Type(s)
string
stripFilter
Regex used for removing color codes
static
since |
4.0.0 |
---|
Type(s)
string