MediaWiki REL1_39
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.
 
 getDefaults ()
 Get all defined default values.
 
 getDefinedKeys ()
 Get a list of all defined keys.
 
 getDynamicDefaults ()
 Get all dynamic default declarations.
 
 getMergeStrategyFor (string $key)
 Get the merge strategy defined for the $key, or null if none defined.
 
 hasDefaultFor (string $key)
 Check if the $key has a default value set in the schema.
 
 hasSchemaFor (string $key)
 Check whether schema for $key is defined.
 

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.

◆ getDynamicDefaults()

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

Get all dynamic default declarations.

See also
DynamicDefaultValues.
Returns
array<string,array>

Implemented in MediaWiki\Settings\Config\ConfigSchemaAggregator.

Referenced by MediaWiki\Settings\DynamicDefaultValues\__construct().

◆ 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: