Manual:getConfiguration.php

From Linux Web Expert

Revision as of 04:50, 6 December 2023 by imported>FuzzyBot (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.23
<translate> MediaWiki version:</translate>

Detalhes

O arquivo getConfiguration.php é um script de manutenção que imprime saídas serializadas de variáveis de configuração do MediaWiki.

Options

Option Description Required Default
--regex Regex to filter variables with <translate> Optional</translate>
--iregex Same as --regex but case insensitive <translate> Optional</translate>
--settings Space-separated list of wg* variables <translate> Optional</translate>
--format Output format, either json, php, serialize, or vardump <translate> Optional</translate> php

Usage

php maintenance/getConfiguration.php [ --regex| --iregex| --settings| --format ]

With settings

Terminal

With regex

Terminal
Use JSON_PARTIAL_OUTPUT_ON_ERROR (--json-partial-output-on-error) flag with json_encode(). This allows for partial response to be output in case of an exception while serializing to JSON. If an error occurs, the wgGetConfigurationJsonErrorOccurred field is set in the output.
Terminal

See also