PHP Class Text_Highlighter_Renderer_Console, yii

Suitable for displaying text on color-capable terminals, directly or trough less -r Elements of $options argument of constructor (each being optional): - 'numbers' - whether to add line numbers - 'tabsize' - Tab size - 'colors' - additional colors
Inheritance: extends Text_Highlighter_Renderer
Exibir arquivo Open project: yiisoft/yii

Public Properties

Property Type Description
$_colors
$_defColors
$_lastClass string class of last outputted text chunk
$_numbers boolean Line numbering
$_output string Highlighted code
$_tabsize integer Tab size

Public Methods

Method Description
acceptToken ( string $class, string $content ) Accepts next token
finalize ( ) Signals that no more tokens are available
getOutput ( ) : string Get generated output
preprocess ( $str )
replaceCallback ( )
reset ( ) Resets renderer state

Method Details

acceptToken() public method

Accepts next token
public acceptToken ( string $class, string $content )
$class string Token class
$content string Token content

finalize() public method

Signals that no more tokens are available
public finalize ( )

getOutput() public method

Get generated output
public getOutput ( ) : string
return string Highlighted code

preprocess() public method

public preprocess ( $str )

replaceCallback() public method

public replaceCallback ( )

reset() public method

Resets renderer state
public reset ( )

Property Details

$_colors public_oe property

public $_colors

$_defColors public_oe property

public $_defColors

$_lastClass public_oe property

class of last outputted text chunk
public string $_lastClass
return string

$_numbers public_oe property

Line numbering
public bool $_numbers
return boolean

$_output public_oe property

Highlighted code
public string $_output
return string

$_tabsize public_oe property

Tab size
public int $_tabsize
return integer