| MediaWiki file: Config.php | |
|---|---|
| Location: | includes/config/ |
| Source code: | master • 1.40.0 • 1.39.4 • 1.35.11 |
| Classes: | Config |
Config is the base interface for implementations that provide access to read various configuration settings.
To get the default implementation, use MediaWiki\MediaWikiServices::getInstance()->getMainConfig(), MediaWiki\MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'main' ) or RequestContext::getMain()->getConfig().
Available implementations in core are:
GlobalVarConfig— can access settings in the$GLOBALSsuperglobal array.MultiConfig— can contain multiple config objects that are acting as fallback sequence.HashConfig— stores the configuration in a member variable, allowing values to be set, rather than only get.
Methods
get( $name )— returns the value of the configuration value named, $name; throws a ConfigException if not set.has( $name )— returns true or false depending if the config object has the configuration value named, $name stored.
See also
- Manual:Configuration for developers
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.