This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Syntax highlighter wrapper class
- Author
- Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
- Deprecated:
- 10
Definition at line 26 of file class.ilSyntaxHighlighter.php.
◆ __construct()
ilSyntaxHighlighter::__construct |
( |
string |
$a_lang | ) |
|
|
protected |
◆ getInstance()
static ilSyntaxHighlighter::getInstance |
( |
string |
$a_lang | ) |
|
|
static |
◆ getNewLanguageId()
static ilSyntaxHighlighter::getNewLanguageId |
( |
string |
$a_old_lang_id | ) |
|
|
static |
◆ getSupportedLanguages()
static ilSyntaxHighlighter::getSupportedLanguages |
( |
| ) |
|
|
static |
Get supported languages (keys are internal values, values are for representation)
- Returns
- string[]
Definition at line 90 of file class.ilSyntaxHighlighter.php.
◆ getSupportedLanguagesV51()
static ilSyntaxHighlighter::getSupportedLanguagesV51 |
( |
| ) |
|
|
static |
◆ highlight()
ilSyntaxHighlighter::highlight |
( |
string |
$a_code | ) |
|
Definition at line 128 of file class.ilSyntaxHighlighter.php.
130 include_once(
"./vendor/composer/vendor/geshi/geshi/src/geshi.php");
131 $geshi =
new Geshi(html_entity_decode($a_code), $this->lang);
136 $a_code = $geshi->parse_code();
139 $a_code = substr($a_code, strpos($a_code,
">") + 1);
140 $a_code = substr($a_code, 0, strrpos($a_code,
"<"));
◆ isSupported()
static ilSyntaxHighlighter::isSupported |
( |
string |
$a_lang | ) |
|
|
static |
◆ $lang
string ilSyntaxHighlighter::$lang |
|
protected |
◆ $langs
array ilSyntaxHighlighter::$langs |
|
staticprotected |
Initial value:= array(
self::BASH => "Bash",
self::C => "C",
self::CPP => "C++",
self::CSS => "CSS",
self::DELPHI => "Delphi",
self::HTML => "HTML",
self::JAVA => "Java",
self::JAVASCRIPT => "Javascript",
self::LATEX => "LaTeX",
self::PHP => "PHP",
self::POWERSHELL => "Powershell",
self::PYTHON => "Python",
self::SQL => "SQL",
self::VISUAL_BASIC => "Visual Basic",
self::XML => "XML"
)
Definition at line 47 of file class.ilSyntaxHighlighter.php.
Referenced by getSupportedLanguagesV51().
◆ $v51_map
array ilSyntaxHighlighter::$v51_map |
|
staticprotected |
◆ BASH
const ilSyntaxHighlighter::BASH = "bash" |
const ilSyntaxHighlighter::C = "c" |
◆ CPP
const ilSyntaxHighlighter::CPP = "cpp" |
◆ CSS
const ilSyntaxHighlighter::CSS = "css" |
◆ DELPHI
const ilSyntaxHighlighter::DELPHI = "delphi" |
◆ HTML
const ilSyntaxHighlighter::HTML = "html4strict" |
◆ JAVA
const ilSyntaxHighlighter::JAVA = "java" |
◆ JAVASCRIPT
const ilSyntaxHighlighter::JAVASCRIPT = "javascript" |
◆ LATEX
const ilSyntaxHighlighter::LATEX = "latex" |
◆ PHP
const ilSyntaxHighlighter::PHP = "php" |
◆ POWERSHELL
const ilSyntaxHighlighter::POWERSHELL = "powershell" |
◆ PYTHON
const ilSyntaxHighlighter::PYTHON = "python" |
◆ SQL
const ilSyntaxHighlighter::SQL = "sql" |
◆ VISUAL_BASIC
const ilSyntaxHighlighter::VISUAL_BASIC = "vb" |
◆ XML
const ilSyntaxHighlighter::XML = "xml" |
The documentation for this class was generated from the following file: