PHP Class Text_Highlighter_Renderer_Array, yii

In addition to the options supported by the HTML renderer, the following options were also introduced:
  • htmlspecialchars - whether or not htmlspecialchars() will be called on the content, default TRUE
  • enumerated - type of array produced, default FALSE, meaning associative array
Inheritance: extends Text_Highlighter_Renderer
Datei anzeigen Open project: yiisoft/yii Class Usage Examples

Public Properties

Property Type Description
$_enumerated integer Enumerated or associative array
$_htmlspecialchars boolean Should htmlentities() will be called
$_output array Array containing highlighting rules
$_tabsize integer Tab size

Public Methods

Method Description
_getFullClassName ( string $class ) Given a CSS class name, returns the class name with language name prepended, if necessary
acceptToken ( string $class, string $content ) Accepts next token
getOutput ( ) : array Get generated output
preprocess ( string $str ) : string Preprocesses code
reset ( ) Resets renderer state

Method Details

_getFullClassName() public method

Given a CSS class name, returns the class name with language name prepended, if necessary
public _getFullClassName ( string $class )
$class string Token class

acceptToken() public method

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

getOutput() public method

Get generated output
public getOutput ( ) : array
return array Highlighted code as an array

preprocess() public method

Preprocesses code
public preprocess ( string $str ) : string
$str string Code to preprocess
return string Preprocessed code

reset() public method

Descendents of Text_Highlighter call this method from the constructor, passing $options they get as parameter.
public reset ( )

Property Details

$_enumerated public_oe property

Enumerated or associative array
public int $_enumerated
return integer

$_htmlspecialchars public_oe property

Should htmlentities() will be called
public bool $_htmlspecialchars
return boolean

$_output public_oe property

Array containing highlighting rules
public array $_output
return array

$_tabsize public_oe property

Tab size
public int $_tabsize
return integer