yii\console\Controller::ansiFormat PHP Method

ansiFormat() public method

You may pass additional parameters using the constants defined in [[\yii\helpers\Console]]. Example: echo $this->ansiFormat('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
public ansiFormat ( string $string ) : string
$string string the string to be formatted
return string
    public function ansiFormat($string)
    {
        if ($this->isColorEnabled()) {
            $args = func_get_args();
            array_shift($args);
            $string = Console::ansiFormat($string, $args);
        }
        return $string;
    }