18 const HTML =
"html4strict";
34 self::VISUAL_BASIC =>
"Visual Basic",
35 self::DELPHI =>
"Delphi"
44 "html" =>
"html4strict"
60 $this->lang = $a_lang;
71 return new self($a_lang);
93 return isset(self::$langs[$a_lang]);
104 if (isset(self::$v51_map[$a_old_lang_id]))
106 return self::$v51_map[$a_old_lang_id];
108 return $a_old_lang_id;
121 $map = array_flip(self::$v51_map);
122 foreach (self::$langs as $k => $v)
141 include_once(
"./libs/composer/vendor/geshi/geshi/src/geshi.php");
142 $geshi =
new Geshi(html_entity_decode($a_code), $this->lang);
147 $a_code =
$geshi->parse_code();
150 $a_code = substr($a_code, strpos($a_code,
">") + 1);
151 $a_code = substr($a_code, 0, strrpos($a_code,
"<"));
if(strncmp( $real_path, SOURCE_ROOT, $base_path_len)) if(!file_exists($path)) $geshi
An exception for terminatinating execution or to throw for unit testing.
Syntax highlighter wrapper class.
__construct($a_lang)
Constructor.
static isSupported($a_lang)
Is language supported?
static getInstance($a_lang)
Get instance.
static getNewLanguageId($a_old_lang_id)
Get new language id (for an old one)
static getSupportedLanguagesV51()
Get supported languages (keys are ILIAS <= 5.1 internal values, values are for representation)
static getSupportedLanguages()
Get supported languages (keys are internal values, values are for representation)
highlight($a_code)
Highlight code.