Manual:$wgParserConf/zh
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed completely in version <tvar name=ver>1.36.0</tvar>.</translate> |
<translate> Parser</translate>: $wgParserConf | |
---|---|
路径配置 |
|
<translate> Introduced in version:</translate> | 1.12.0 |
<translate> Deprecated in version:</translate> | 1.35.0 (Gerrit change 589397; git #a286a59e) |
<translate> Removed in version:</translate> | 1.36.0 (Gerrit change 665228; git #77c48b68) |
<translate> Allowed values:</translate> | (数组) |
<translate> Default value:</translate> | (參見下方) |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
细节
Configure the ParserFactory service in order to customize the Parser used.
Associative array with the following members:
- class
- 类名
- 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.
默认值
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>"><translate> ≥</translate> 1.35
<translate> MediaWiki version:</translate> |
$wgParserConf = [
'class' => Parser::class,
];
1.31 – 1.34
<translate> MediaWiki versions:</translate> |
$wgParserConf = [
'class' => Parser::class,
# 'preprocessorClass' => Preprocessor_Hash::class,
];
1.13 – 1.30
<translate> MediaWiki versions:</translate> |
$wgParserConf = [
'class' => 'Parser',
# 'preprocessorClass' => 'Preprocessor_Hash',
];
1.12
MediaWiki版本: |
$wgParserConf = array(
'class' => 'Parser',
'preprocessorClass' => 'Preprocessor_Hash',
);
Categories:
- MediaWiki configuration settings/zh
- MediaWiki configuration settings introduced in version 1.12.0/zh
- MediaWiki configuration settings deprecated in version 1.35.0/zh
- MediaWiki configuration settings removed in version 1.36.0/zh
- Pages with broken file links
- MediaWiki deprecated or obsolete features/zh
- Parser variables/zh