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])) {
105 return self::$v51_map[$a_old_lang_id];
107 return $a_old_lang_id;
120 $map = array_flip(self::$v51_map);
121 foreach (self::$langs as $k => $v) {
122 if (isset(
$map[$k])) {
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,
"<"));
static getNewLanguageId($a_old_lang_id)
Get new language id (for an old one)
if(strncmp($real_path, SOURCE_ROOT, $base_path_len)) if(!file_exists($path)) $geshi
Syntax highlighter wrapper class.
highlight($a_code)
Highlight code.
static getSupportedLanguages()
Get supported languages (keys are internal values, values are for representation) ...
static getSupportedLanguagesV51()
Get supported languages (keys are ILIAS <= 5.1 internal values, values are for representation) ...
static isSupported($a_lang)
Is language supported?
static getInstance($a_lang)
Get instance.
__construct($a_lang)
Constructor.