Podręcznik:GetConfiguration.php

This page is a translated version of the page Manual:GetConfiguration.php and the translation is 67% complete.
Wersja MediaWiki:
1.23

Szczegóły

getConfiguration.php file is a maintenance script to print serialized output of MediaWiki config variables.

This script is very useful while MediaWiki development to get config variables very quickly.

Options

getConfiguration.php accepts four options.

Option Description Required Default
--regex Regex to filter variables with Optional
--iregex Same as --regex but case insensitive Optional
--settings Space-separated list of wg* variables Optional
--format One of the json, php, serialize, vardump format Optional 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