MediaWiki REL1_39
MediaWiki\Settings\Config\GlobalConfigBuilder Class Reference
Inheritance diagram for MediaWiki\Settings\Config\GlobalConfigBuilder:
Collaboration diagram for MediaWiki\Settings\Config\GlobalConfigBuilder:

Public Member Functions

 __construct (string $prefix=self::DEFAULT_PREFIX)
 
 build ()
 Build the resulting Config object.
 
 get (string $key)
 Get the current value for $key.
 
 setMulti (array $values, array $mergeStrategies=[])
 Set all values in the array.
Parameters
array$values
MergeStrategy[]$mergeStrategiesThe merge strategies indexed by config key
Returns
ConfigBuilder

 
- Public Member Functions inherited from MediaWiki\Settings\Config\ConfigBuilderBase
 set (string $key, $newValue, MergeStrategy $mergeStrategy=null)
 Set the configuration $key to $value.
Parameters
string$key
mixed$value
MergeStrategy | null$mergeStrategystrategy for merging array config values.
Returns
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.
Parameters
string$key
mixed$defaultValue
MergeStrategy | null$mergeStrategystrategy for merging array config values.
Returns
ConfigBuilder

 
 setMultiDefault (array $defaults, array $mergeStrategies)
 Set defaults in a batch.
Parameters
array$defaultsThe default values
MergeStrategy[]$mergeStrategiesThe merge strategies indexed by config key
Returns
ConfigBuilder
Exceptions
SettingsBuilderExceptionif a merge strategy is not provided and the value is not an array.

 

Protected Member Functions

 has (string $key)
 
 update (string $key, $value)
 

Detailed Description

Definition at line 9 of file GlobalConfigBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Settings\Config\GlobalConfigBuilder::__construct ( string $prefix = self::DEFAULT_PREFIX)
Parameters
string$prefix

Definition at line 20 of file GlobalConfigBuilder.php.

Member Function Documentation

◆ build()

MediaWiki\Settings\Config\GlobalConfigBuilder::build ( )

Build the resulting Config object.

Returns
Config

Implements MediaWiki\Settings\Config\ConfigBuilder.

Definition at line 71 of file GlobalConfigBuilder.php.

◆ get()

MediaWiki\Settings\Config\GlobalConfigBuilder::get ( string $key)

Get the current value for $key.

Parameters
string$key
Returns
mixed

Implements MediaWiki\Settings\Config\ConfigBuilder.

Definition at line 33 of file GlobalConfigBuilder.php.

◆ has()

MediaWiki\Settings\Config\GlobalConfigBuilder::has ( string $key)
protected

Reimplemented from MediaWiki\Settings\Config\ConfigBuilderBase.

Definition at line 24 of file GlobalConfigBuilder.php.

◆ setMulti()

MediaWiki\Settings\Config\GlobalConfigBuilder::setMulti ( array $values,
array $mergeStrategies = [] )

Set all values in the array.

Parameters
array$values
MergeStrategy[]$mergeStrategiesThe merge strategies indexed by config key
Returns
ConfigBuilder

Reimplemented from MediaWiki\Settings\Config\ConfigBuilderBase.

Definition at line 43 of file GlobalConfigBuilder.php.

◆ update()

MediaWiki\Settings\Config\GlobalConfigBuilder::update ( string $key,
$value )
protected

Reimplemented from MediaWiki\Settings\Config\ConfigBuilderBase.

Definition at line 38 of file GlobalConfigBuilder.php.


The documentation for this class was generated from the following file: