PHP Класс 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
Автор: Stoyan Stefanov ([email protected])
Наследование: extends Text_Highlighter_Renderer
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_enumerated integer Enumerated or associative array
$_htmlspecialchars boolean Should htmlentities() will be called
$_output array Array containing highlighting rules
$_tabsize integer Tab size

Открытые методы

Метод Описание
_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

Описание методов

_getFullClassName() публичный Метод

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

acceptToken() публичный Метод

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

getOutput() публичный Метод

Get generated output
public getOutput ( ) : array
Результат array Highlighted code as an array

preprocess() публичный Метод

Preprocesses code
public preprocess ( string $str ) : string
$str string Code to preprocess
Результат string Preprocessed code

reset() публичный Метод

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

Описание свойств

$_enumerated публичное свойство

Enumerated or associative array
public int $_enumerated
Результат integer

$_htmlspecialchars публичное свойство

Should htmlentities() will be called
public bool $_htmlspecialchars
Результат boolean

$_output публичное свойство

Array containing highlighting rules
public array $_output
Результат array

$_tabsize публичное свойство

Tab size
public int $_tabsize
Результат integer