Manual:$wgParserConf
Appearance
This feature was removed completely in version 1.36.0. |
Parser: $wgParserConf | |
---|---|
Parser configuration. |
|
Introduced in version: | 1.12.0 |
Deprecated in version: | 1.35.0 (Gerrit change 589397; git #a286a59e) |
Removed in version: | 1.36.0 (Gerrit change 665228; git #77c48b68) |
Allowed values: | (array) |
Default value: | (see below) |
Other settings: Alphabetical | By function |
Details
[edit]Configure the ParserFactory service in order to customize the Parser used.
Associative array with the following members:
- class
- The class name
- preprocessorClass
- The preprocessor class. Two classes are currently available: Preprocessor_Hash, which uses plain PHP arrays for temporary storage, and Preprocessor_DOM, which uses the DOM module for temporary storage. Preprocessor_DOM generally uses less memory; the speed of the two is roughly the same.
- If this parameter is not given, it uses Preprocessor_DOM if the DOM module is available, otherwise it uses Preprocessor_Hash.
The entire associative array will be passed through to the constructor as the first parameter.
Note that only Setup.php can use this variable -- the configuration will change at runtime via $wgParser member functions, so the contents of this variable will be out-of-date.
The variable can only be changed during LocalSettings.php
, in particular, it can't be changed during an extension setup function.
Default values
[edit]MediaWiki version: | ≥ 1.35 |
$wgParserConf = [
'class' => Parser::class,
];
MediaWiki versions: | 1.31 – 1.34 |
$wgParserConf = [
'class' => Parser::class,
# 'preprocessorClass' => Preprocessor_Hash::class,
];
MediaWiki versions: | 1.13 – 1.30 |
$wgParserConf = [
'class' => 'Parser',
# 'preprocessorClass' => 'Preprocessor_Hash',
];
MediaWiki version: | 1.12 |
$wgParserConf = array(
'class' => 'Parser',
'preprocessorClass' => 'Preprocessor_Hash',
);