MediaWiki  1.29.1
SyntaxHighlight_GeSHi.compat.php
Go to the documentation of this file.
1 <?php
25 class GeSHi {
27  public static $compatibleLexers = array(
28  // Assembler
29  'arm' => 'asm',
30  '6502acme' => 'asm',
31  '6502tasm' => 'asm',
32  '6502kickass'=> 'asm',
33  '68000devpac'=> 'asm',
34  'dcpu16' => 'asm',
35  'm68k' => 'asm',
36  'mmix' => 'nasm',
37  'mpasm' => 'asm',
38  'pic16' => 'asm',
39  'z80' => 'asm',
40 
41  // BASIC
42  'xbasic' => 'basic',
43  'thinbasic' => 'basic',
44  'sdlbasic' => 'basic',
45  'purebasic' => 'basic',
46  'mapbasic' => 'basic',
47  'locobasic' => 'basic',
48  'gwbasic' => 'basic',
49  'freebasic' => 'basic',
50  'basic4gl' => 'basic',
51  'zxbasic' => 'basic',
52  'gambas' => 'basic',
53  'oobas' => 'basic',
54  'bascomavr' => 'basic',
55 
56  // C / C++
57  'c_loadrunner' => 'c',
58  'c_mac' => 'c',
59  'c_winapi' => 'c',
60  'upc' => 'c',
61  'cpp-qt' => 'cpp',
62  'cpp-winapi' => 'cpp',
63  'urbi' => 'cpp',
64 
65  // HTML
66  'html4strict' => 'html',
67  'html5' => 'html',
68 
69  // JavaScript
70  'jquery' => 'javascript',
71  'ecmascript' => 'javascript',
72 
73  // Microsoft
74  'vb' => 'vbnet',
75  'asp' => 'aspx-vb',
76  'visualfoxpro' => 'foxpro',
77  'dos' => 'bat',
78  'visualprolog' => 'prolog',
79  'reg' => 'registry',
80 
81  // Miscellaneous
82  'cadlisp' => 'lisp',
83  'java5' => 'java',
84  'php-brief' => 'php',
85  'povray' => 'pov',
86  'pys60' => 'python',
87  'rails' => 'ruby',
88  'rpmspec' => 'spec',
89  'rsplus' => 'splus',
90  'gettext' => 'pot',
91 
92  // ML
93  'ocaml-brief' => 'ocaml',
94  'standardml' => 'sml',
95 
96  // Modula 2
97  'modula3' => 'modula2',
98  'oberon2' => 'modula2',
99 
100  // SQL
101  'dcl' => 'sql',
102  'plsql' => 'sql',
103  'oracle11' => 'sql',
104  'oracle8' => 'sql',
105 
106  // REXX
107  'oorexx' => 'rexx',
108  'netrexx' => 'rexx',
109 
110  // xpp is basically Java
111  'xpp' => 'java',
112 
113  // apt
114  'apt_sources' => 'debsources',
115  );
116 
117  public function __construct( $html ) {
118  $this->html = $html;
119  }
120 
121  public function error() {
122  }
123 
124  public function set_language( $language ) {
125  }
126 
127  public function parse_code() {
128  global $wgOut;
129  $wgOut->addModuleStyles( 'ext.pygments' );
130  return $this->html;
131  }
132 }
GeSHi::__construct
__construct( $html)
Definition: SyntaxHighlight_GeSHi.compat.php:117
GeSHi::set_language
set_language( $language)
Definition: SyntaxHighlight_GeSHi.compat.php:124
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
GeSHi::error
error()
Definition: SyntaxHighlight_GeSHi.compat.php:121
$html
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
Definition: hooks.txt:1956
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
GeSHi::parse_code
parse_code()
Definition: SyntaxHighlight_GeSHi.compat.php:127
GeSHi
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
Definition: SyntaxHighlight_GeSHi.compat.php:25
$wgOut
$wgOut
Definition: Setup.php:791
GeSHi::$compatibleLexers
static array $compatibleLexers
A mapping of GeSHi lexer names to compatible Pygments lexers.
Definition: SyntaxHighlight_GeSHi.compat.php:27
array
the array() calling protocol came about after MediaWiki 1.4rc1.