ColorProcessor
Extends ColorProcessorClass ColorProcessor.
| since |
1.0 |
|---|---|
| deprecated |
2.0 Use the |
| package |
Joomla Framework |
Methods
__construct
Class constructor
__construct(bool noColors = null) : mixed
| since |
1.1.0 |
|---|
Arguments
- noColors
boolDefines non-colored mode on construct
Response
mixed
addPredefinedStyles
Adds predefined color styles to the ColorProcessor object
addPredefinedStyles() : \Joomla\Application\Cli\Output\Stdout
| since |
1.0 |
|---|
Response
\Joomla\Application\Cli\Output\StdoutInstance of $this to allow chaining.
addStyle
Add a style.
addStyle(string name, \Joomla\Application\Cli\ColorStyle style) : \Joomla\Application\Cli\Output\Processor\ColorProcessor
| since |
1.0 |
|---|
Arguments
- name
stringThe style name.- style
\Joomla\Application\Cli\ColorStyleThe color style.
Response
\Joomla\Application\Cli\Output\Processor\ColorProcessorInstance of $this to allow chaining.
process
Process a string.
process(string string) : string
| since |
1.0 |
|---|
Arguments
- string
stringThe string to process.
Response
string
replaceColors
Replace color tags in a string.
replaceColors(string text, string tag, string match, \Joomla\Application\Cli\ColorStyle style) : string
| since |
1.0 |
|---|
Arguments
- text
stringThe original text.- tag
stringThe matched tag.- match
stringThe match.- style
\Joomla\Application\Cli\ColorStyleThe color style to apply.
Response
string
stripColors
Strip color tags from a string.
stripColors(string string) : string
| since |
1.0 |
|---|
Arguments
- string
stringThe string.
Response
string
Properties
noColors
Flag to remove color codes from the output
| since |
1.0 |
|---|
Type(s)
bool
tagFilter
Regex to match tags
| since |
1.0 |
|---|
Type(s)
string
stripFilter
Regex used for removing color codes
| since |
1.0 |
|---|
Type(s)
string
styles
Array of ColorStyle objects
| since |
1.0 |
|---|
Type(s)
array