Back to Joomla project (class list)

Class ColorProcessor - list of methods

Command line output processor supporting ANSI-colored output

Extends

Package: Joomla\CMS\Application\CLI\Output\Processor
Copyright: (C) 2014 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Application/CLI/Output/Processor/ColorProcessor.php
Project: Joomla

Method Summary

public
(mixed $noColors = null)

Class constructor
Parameters
  • bool $noColors Defines non-colored mode on construct
Since
  • 4.0.0
Show source code of this method: __construct Source Code

public $this
(mixed $name, \Joomla\CMS\Application\CLI\ColorStyle $style)

Add a style.
Parameters
  • string $name The style name.
  • \Joomla\CMS\Application\CLI\ColorStyle $style The color style.
Returns
  • $this
Since
  • 4.0.0
Show source code of this method: addStyle Source Code

public static string
(mixed $string)

Strip color tags from a string.
Parameters
  • string $string The string.
Returns
  • string
Since
  • 4.0.0
Show source code of this method: stripColors Source Code

public string
(mixed $string)

Process a string.
Parameters
  • string $string The string to process.
Returns
  • string
Since
  • 4.0.0
Show source code of this method: process Source Code

private mixed
(mixed $text, mixed $tag, mixed $match, \Joomla\CMS\Application\CLI\ColorStyle $style)

Replace color tags in a string.
Parameters
  • string $text The original text.
  • string $tag The matched tag.
  • string $match The match.
  • \Joomla\CMS\Application\CLI\ColorStyle $style The color style to apply.
Returns
  • mixed
Since
  • 4.0.0
Show source code of this method: replaceColors Source Code

private $this
()

Adds predefined color styles to the ColorProcessor object
Returns
  • $this
Since
  • 4.0.0
Show source code of this method: addPredefinedStyles Source Code

Properties Summary

public bool
$noColors
Flag to remove color codes from the output
Since
  • 4.0.0
protected string
$tagFilter
Regex to match tags
Since
  • 4.0.0
protected static string
$stripFilter
Regex used for removing color codes
Since
  • 4.0.0
protected \Joomla\CMS\Application\CLI\ColorStyle[]
$styles
Array of ColorStyle objects
Since
  • 4.0.0

Tags Summary

Since
4.0.0
Deprecated
5.0
Use the `joomla/console` package instead