helpers\BaseConsole ansiToHtml()

ansiToHtml() public static method

Converts an ANSI formatted string to HTML

Note: xTerm 256 bit colors are currently not supported.

public static string ansiToHtml ( $string, $styleMap = [] )
$string string

The string to convert.

$styleMap array

An optional mapping of ANSI control codes such as FG_COLOR or BOLD to a set of css style definitions. The CSS style definitions are represented as an array where the array keys correspond to the css style attribute names and the values are the css values. values may be arrays that will be merged and imploded with ' ' when rendered.

return string

HTML representation of the ANSI formatted string

doc_Yii
2016-10-30 17:04:30
Comments
Leave a Comment

Please login to continue.