ColorProcessor
Implements ProcessorInterfaceCommand line output processor supporting ANSI-colored output
deprecated
since |
4.0.0 |
---|---|
deprecated |
5.0 Use the |
package |
Joomla CMS |
Methods
__construct
Class constructor
__construct(bool noColors = null) : mixed
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() : $this
since |
4.0.0 |
---|
Response
$this
addStyle
Add a style.
addStyle(string name, \Joomla\CMS\Application\CLI\ColorStyle style) : $this
since |
4.0.0 |
---|
Arguments
- name
string
The style name.- style
\Joomla\CMS\Application\CLI\ColorStyle
The color style.
Response
$this
process
Process a string.
process(string string) : string
since |
4.0.0 |
---|
Arguments
- string
string
The string to process.
Response
string
replaceColors
Replace color tags in a string.
replaceColors(string text, string tag, string match, \Joomla\CMS\Application\CLI\ColorStyle style) : mixed
since |
4.0.0 |
---|
Arguments
- text
string
The original text.- tag
string
The matched tag.- match
string
The match.- style
\Joomla\CMS\Application\CLI\ColorStyle
The color style to apply.
Response
mixed
stripColors
Strip color tags from a string.
stripColors(string string) : string
static
since |
4.0.0 |
---|
Arguments
- string
string
The string.
Response
string