MediaWiki master
MediaWiki\Config\MultiConfig Class Reference

Provides a fallback sequence for Config objects. More...

Inherits MediaWiki\Config\Config.

Collaboration diagram for MediaWiki\Config\MultiConfig:

Public Member Functions

 __construct (private readonly array $configs,)
 
 get ( $name)
 Get a configuration variable such as "Sitename" or "UploadMaintenance.".
Parameters
string$nameName of configuration option
Returns
mixed Value configured
Exceptions
ConfigException

 
 has ( $name)
 Check whether a configuration option is set for the given name.
Parameters
string$nameName of configuration option
Returns
bool
Since
1.24

 

Detailed Description

Provides a fallback sequence for Config objects.

Since
1.24

Definition at line 16 of file MultiConfig.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Config\MultiConfig::__construct ( private readonly array $configs)
Parameters
Config[]$configsArray of Config objects to use Order matters, the Config objects will be checked in order to see whether they have the requested setting

Definition at line 25 of file MultiConfig.php.

Member Function Documentation

◆ get()

MediaWiki\Config\MultiConfig::get ( $name)

Get a configuration variable such as "Sitename" or "UploadMaintenance.".

Parameters
string$nameName of configuration option
Returns
mixed Value configured
Exceptions
ConfigException

Implements MediaWiki\Config\Config.

Definition at line 33 of file MultiConfig.php.

◆ has()

MediaWiki\Config\MultiConfig::has ( $name)

Check whether a configuration option is set for the given name.

Parameters
string$nameName of configuration option
Returns
bool
Since
1.24

Implements MediaWiki\Config\Config.

Definition at line 46 of file MultiConfig.php.


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