Manual:Config.php
Appearance
| MediaWiki ファイル: Config.php | |
|---|---|
| 場所: | includes/config/ (1.46 以降は includes/Config/) |
| ソース コード: | master • 1.45.1 • 1.44.3 • 1.43.6 |
| クラス: | 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().
コア内で利用できる実装は以下の通りです:
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.
メソッド
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.