MediaWiki REL1_40
|
Builder for Config objects. More...
Inherited by MediaWiki\Settings\Config\ConfigBuilderBase.
Public Member Functions | |
build () | |
Build the resulting Config object. | |
get (string $key) | |
Get the current value for $key. | |
set (string $key, $value, MergeStrategy $mergeStrategy=null) | |
Set the configuration $key to $value. | |
setDefault (string $key, $defaultValue, MergeStrategy $mergeStrategy=null) | |
Set the default for the configuration $key to $defaultValue. | |
setMulti (array $values, array $mergeStrategies=[]) | |
Set all values in the array. | |
setMultiDefault (array $defaults, array $mergeStrategies) | |
Set defaults in a batch. | |
MediaWiki\Settings\Config\ConfigBuilder::build | ( | ) |
Build the resulting Config object.
Implemented in MediaWiki\Settings\Config\ArrayConfigBuilder, and MediaWiki\Settings\Config\GlobalConfigBuilder.
MediaWiki\Settings\Config\ConfigBuilder::get | ( | string | $key | ) |
Get the current value for $key.
string | $key |
Implemented in MediaWiki\Settings\Config\ArrayConfigBuilder, and MediaWiki\Settings\Config\GlobalConfigBuilder.
MediaWiki\Settings\Config\ConfigBuilder::set | ( | string | $key, |
$value, | |||
MergeStrategy | $mergeStrategy = null ) |
Set the configuration $key to $value.
string | $key | |
mixed | $value | |
MergeStrategy | null | $mergeStrategy | strategy for merging array config values. |
Implemented in MediaWiki\Settings\Config\ConfigBuilderBase.
MediaWiki\Settings\Config\ConfigBuilder::setDefault | ( | string | $key, |
$defaultValue, | |||
MergeStrategy | $mergeStrategy = null ) |
Set the default for the configuration $key to $defaultValue.
If the $key is already set, non-array $defaultValue will be ignored, for array $defaultValue the existing value will be merged into it as if the default was already there when the existing value was set.
string | $key | |
mixed | $defaultValue | |
MergeStrategy | null | $mergeStrategy | strategy for merging array config values. |
Implemented in MediaWiki\Settings\Config\ConfigBuilderBase.
MediaWiki\Settings\Config\ConfigBuilder::setMulti | ( | array | $values, |
array | $mergeStrategies = [] ) |
Set all values in the array.
array | $values | |
MergeStrategy[] | $mergeStrategies | The merge strategies indexed by config key |
Implemented in MediaWiki\Settings\Config\ArrayConfigBuilder, MediaWiki\Settings\Config\ConfigBuilderBase, and MediaWiki\Settings\Config\GlobalConfigBuilder.
MediaWiki\Settings\Config\ConfigBuilder::setMultiDefault | ( | array | $defaults, |
array | $mergeStrategies ) |
Set defaults in a batch.
array | $defaults | The default values |
MergeStrategy[] | $mergeStrategies | The merge strategies indexed by config key |
SettingsBuilderException | if a merge strategy is not provided and the value is not an array. |
Implemented in MediaWiki\Settings\Config\ConfigBuilderBase.