Back to ColorProcessor class

Method addStyle

public $this
addStyle
(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

Method addStyle - Source code

/**
 * Add a style.
 *
 * @param   string      $name   The style name.
 * @param   ColorStyle  $style  The color style.
 *
 * @return  $this
 *
 * @since   4.0.0
 */
public function addStyle($name, ColorStyle $style)
{
    $this->styles[$name] = $style;
    return $this;
}