Syntax highlighter wrapper class.
More...
Syntax highlighter wrapper class.
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 12 of file class.ilSyntaxHighlighter.php.
◆ __construct()
ilSyntaxHighlighter::__construct |
( |
|
$a_lang | ) |
|
|
protected |
◆ getInstance()
static ilSyntaxHighlighter::getInstance |
( |
|
$a_lang | ) |
|
|
static |
◆ getNewLanguageId()
static ilSyntaxHighlighter::getNewLanguageId |
( |
|
$a_old_lang_id | ) |
|
|
static |
◆ getSupportedLanguages()
static ilSyntaxHighlighter::getSupportedLanguages |
( |
| ) |
|
|
static |
◆ getSupportedLanguagesV51()
static ilSyntaxHighlighter::getSupportedLanguagesV51 |
( |
| ) |
|
|
static |
◆ highlight()
ilSyntaxHighlighter::highlight |
( |
|
$a_code | ) |
|
Highlight code.
- Parameters
-
- Returns
- string highlighted code
Definition at line 136 of file class.ilSyntaxHighlighter.php.
References $geshi.
138 include_once(
"./libs/composer/vendor/geshi/geshi/src/geshi.php");
139 $geshi =
new Geshi(html_entity_decode($a_code), $this->lang);
144 $a_code =
$geshi->parse_code();
147 $a_code = substr($a_code, strpos($a_code,
">") + 1);
148 $a_code = substr($a_code, 0, strrpos($a_code,
"<"));
if(strncmp($real_path, SOURCE_ROOT, $base_path_len)) if(!file_exists($path)) $geshi
◆ isSupported()
static ilSyntaxHighlighter::isSupported |
( |
|
$a_lang | ) |
|
|
static |
◆ $lang
ilSyntaxHighlighter::$lang |
|
protected |
◆ $langs
ilSyntaxHighlighter::$langs |
|
staticprotected |
Initial value:= array(
self::JAVA => "Java",
self::C => "C",
self::CPP => "C++",
self::HTML => "HTML",
self::XML => "XML",
self::VISUAL_BASIC => "Visual Basic",
self::DELPHI => "Delphi"
)
Definition at line 27 of file class.ilSyntaxHighlighter.php.
Referenced by getSupportedLanguagesV51().
◆ $v51_map
ilSyntaxHighlighter::$v51_map |
|
staticprotected |
const ilSyntaxHighlighter::C = "c" |
◆ CPP
const ilSyntaxHighlighter::CPP = "cpp" |
◆ DELPHI
const ilSyntaxHighlighter::DELPHI = "delphi" |
◆ HTML
const ilSyntaxHighlighter::HTML = "html4strict" |
◆ JAVA
const ilSyntaxHighlighter::JAVA = "java" |
◆ LATEX
const ilSyntaxHighlighter::LATEX = "latex" |
◆ PHP
const ilSyntaxHighlighter::PHP = "php" |
◆ VISUAL_BASIC
const ilSyntaxHighlighter::VISUAL_BASIC = "vb" |
◆ XML
const ilSyntaxHighlighter::XML = "xml" |
The documentation for this class was generated from the following file: