Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1426271
ConfigBuilder.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ConfigBuilder.php
View Options
<?php
namespace
MediaWiki\Settings\Config
;
use
MediaWiki\Config\Config
;
use
MediaWiki\Settings\SettingsBuilderException
;
/**
* Builder for Config objects.
*
* @unstable
*/
interface
ConfigBuilder
{
/**
* Set the configuration $key to $value.
*
* @param string $key
* @param mixed $value
* @param MergeStrategy|null $mergeStrategy strategy for merging array config values.
* @return ConfigBuilder
*/
public
function
set
(
string
$key
,
$value
,
?
MergeStrategy
$mergeStrategy
=
null
):
ConfigBuilder
;
/**
* Set all values in the array.
*
* @param array $values
* @param MergeStrategy[] $mergeStrategies The merge strategies indexed by config key
* @return ConfigBuilder
*/
public
function
setMulti
(
array
$values
,
array
$mergeStrategies
=
[]
):
ConfigBuilder
;
/**
* 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.
*
* @param string $key
* @param mixed $defaultValue
* @param MergeStrategy|null $mergeStrategy strategy for merging array config values.
* @return ConfigBuilder
*/
public
function
setDefault
(
string
$key
,
$defaultValue
,
?
MergeStrategy
$mergeStrategy
=
null
):
ConfigBuilder
;
/**
* Set defaults in a batch.
*
* @param array $defaults The default values
* @param MergeStrategy[] $mergeStrategies The merge strategies indexed by config key
* @return ConfigBuilder
* @throws SettingsBuilderException if a merge strategy is not provided and
* the value is not an array.
*/
public
function
setMultiDefault
(
array
$defaults
,
array
$mergeStrategies
):
ConfigBuilder
;
/**
* Get the current value for $key.
*
* @param string $key
* @return mixed
*/
public
function
get
(
string
$key
);
/**
* Build the resulting Config object.
*
* @return Config
*/
public
function
build
():
Config
;
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 12:57 (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a2/65/cd8b55a38905db11c0e472d3c0aa
Default Alt Text
ConfigBuilder.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment