MediaWiki master
MediaWiki\Config\GlobalVarConfig Class Reference

Accesses configuration settings from $GLOBALS. More...

Inherits MediaWiki\Config\Config.

Collaboration diagram for MediaWiki\Config\GlobalVarConfig:

Public Member Functions

 __construct (private readonly string $prefix='wg',)
 
 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

 

Static Public Member Functions

static newInstance ()
 Default builder function.
 

Detailed Description

Accesses configuration settings from $GLOBALS.

Stability: newable
Since
1.23

Definition at line 19 of file GlobalVarConfig.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Config\GlobalVarConfig::__construct ( private readonly string $prefix = 'wg')
Stability: stable
to call
Parameters
string$prefixPrefix to use for configuration variables

Definition at line 34 of file GlobalVarConfig.php.

Member Function Documentation

◆ get()

MediaWiki\Config\GlobalVarConfig::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 42 of file GlobalVarConfig.php.

◆ has()

MediaWiki\Config\GlobalVarConfig::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 63 of file GlobalVarConfig.php.

◆ newInstance()

static MediaWiki\Config\GlobalVarConfig::newInstance ( )
static

Default builder function.

Returns
self

Definition at line 25 of file GlobalVarConfig.php.


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