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
Afficher le fichier Open project: yiisoft/yii Class Usage Examples

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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 méthode

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 méthode

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

getOutput() public méthode

Get generated output
public getOutput ( ) : array
Résultat array Highlighted code as an array

preprocess() public méthode

Preprocesses code
public preprocess ( string $str ) : string
$str string Code to preprocess
Résultat string Preprocessed code

reset() public méthode

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
Résultat integer

$_htmlspecialchars public_oe property

Should htmlentities() will be called
public bool $_htmlspecialchars
Résultat boolean

$_output public_oe property

Array containing highlighting rules
public array $_output
Résultat array

$_tabsize public_oe property

Tab size
public int $_tabsize
Résultat integer