MediaWiki  master
MediaWiki\Settings\Config\ConfigSchema Interface Reference

Represents a config schema. More...

Inheritance diagram for MediaWiki\Settings\Config\ConfigSchema:

Public Member Functions

 getDefaultFor (string $key)
 Get the default value for the $key. More...
 
 getDefaults ()
 Get all defined default values. More...
 
 getDefinedKeys ()
 Get a list of all defined keys. More...
 
 getMergeStrategyFor (string $key)
 Get the merge strategy defined for the $key, or null if none defined. More...
 
 hasDefaultFor (string $key)
 Check if the $key has a default value set in the schema. More...
 
 hasSchemaFor (string $key)
 Check whether schema for $key is defined. More...
 

Detailed Description

Represents a config schema.

Since
1.39

Definition at line 11 of file ConfigSchema.php.

Member Function Documentation

◆ getDefaultFor()

MediaWiki\Settings\Config\ConfigSchema::getDefaultFor ( string  $key)

Get the default value for the $key.

For keys that do not define a default, null is assumed.

Parameters
string$key
Returns
mixed

Implemented in MediaWiki\Settings\Config\ConfigSchemaAggregator.

◆ getDefaults()

MediaWiki\Settings\Config\ConfigSchema::getDefaults ( )

Get all defined default values.

Returns
array<string,mixed> An associative array mapping setting names to their respective default values.

Implemented in MediaWiki\Settings\Config\ConfigSchemaAggregator.

◆ getDefinedKeys()

MediaWiki\Settings\Config\ConfigSchema::getDefinedKeys ( )

Get a list of all defined keys.

Returns
string[]

Implemented in MediaWiki\Settings\Config\ConfigSchemaAggregator.

◆ getMergeStrategyFor()

MediaWiki\Settings\Config\ConfigSchema::getMergeStrategyFor ( string  $key)

Get the merge strategy defined for the $key, or null if none defined.

Parameters
string$key
Returns
MergeStrategy|null
Exceptions
SettingsBuilderExceptionif merge strategy name is invalid.

Implemented in MediaWiki\Settings\Config\ConfigSchemaAggregator.

◆ hasDefaultFor()

MediaWiki\Settings\Config\ConfigSchema::hasDefaultFor ( string  $key)

Check if the $key has a default value set in the schema.

Parameters
string$key
Returns
bool

Implemented in MediaWiki\Settings\Config\ConfigSchemaAggregator.

◆ hasSchemaFor()

MediaWiki\Settings\Config\ConfigSchema::hasSchemaFor ( string  $key)

Check whether schema for $key is defined.

Parameters
string$key
Returns
bool

Implemented in MediaWiki\Settings\Config\ConfigSchemaAggregator.


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