Class Text_Highlighter
Text highlighter base class
This class implements all functions necessary for highlighting, but it does not contain highlighting rules. Actual highlighting is done using a descendent of this class.
One is not supposed to manually create descendent classes. Instead, describe
highlighting rules in XML format and use Text_Highlighter_Generator
to
create descendent class. Alternatively, an instance of a descendent class can be
created directly.
Use Text_Highlighter::factory()
to create an object for particular
language highlighter
Usage example
require_once 'Text/Highlighter.php'; $hlSQL =& Text_Highlighter::factory('SQL',array('numbers'=>true)); echo $hlSQL->highlight('SELECT * FROM table a WHERE id = 12');
Direct known subclasses
Text_Highlighter_ABAP, Text_Highlighter_CPP, Text_Highlighter_PHP, Text_Highlighter_PYTHON, Text_Highlighter_RUBY, Text_Highlighter_SH, Text_Highlighter_SQL, Text_Highlighter_VBSCRIPT, Text_Highlighter_XML, Text_Highlighter_CSS, Text_Highlighter_DIFF, Text_Highlighter_DTD, Text_Highlighter_HTML, Text_Highlighter_JAVA, Text_Highlighter_JAVASCRIPT, Text_Highlighter_MYSQL, Text_Highlighter_PERL
Package: Text\Highlighter
Copyright: 2004-2006 Andrey Demenev
License: PHP License
Author: Andrey Demenev <demenev@gmail.com>
Located at x2engine/framework/vendors/TextHighlighter/Text/Highlighter.php
Copyright: 2004-2006 Andrey Demenev
License: PHP License
Author: Andrey Demenev <demenev@gmail.com>
Located at x2engine/framework/vendors/TextHighlighter/Text/Highlighter.php
public
|
|
public static
mixed
|
|
public
|
|
public
|
|
public
|
|
public
string
|
public
array
|
$_syntax |
|
#
Syntax highlighting rules. Auto-generated classes set this var |
public
array
|
$_renderer |
|
#
Renderer object. |
public
array
|
$_options | array() |
#
Options. Keeped for BC |
public
array
|
$_conditions | array() |
#
Conditionds |
public
array
|
$_disabled | array() |
#
Disabled keywords |
public
string
|
$_language | '' |
#
Language |