MediaWiki  1.23.2
GlobalVarConfig Class Reference

Accesses configuration settings from $GLOBALS. More...

Inheritance diagram for GlobalVarConfig:
Collaboration diagram for GlobalVarConfig:

Public Member Functions

 __construct ( $prefix='wg')
 
 get ( $name)
 
 set ( $name, $value)
 

Static Public Member Functions

static newInstance ()
 Default builder function. More...
 

Protected Member Functions

 getWithPrefix ( $prefix, $name)
 Get a variable with a given prefix, if not the defaults. More...
 
 setWithPrefix ( $prefix, $name, $value)
 Get a variable with a given prefix, if not the defaults. More...
 

Private Attributes

string $prefix
 Prefix to use for configuration variables. More...
 

Detailed Description

Accesses configuration settings from $GLOBALS.

Since
1.23

Definition at line 28 of file GlobalVarConfig.php.

Constructor & Destructor Documentation

◆ __construct()

GlobalVarConfig::__construct (   $prefix = 'wg')

Definition at line 43 of file GlobalVarConfig.php.

References $prefix.

Member Function Documentation

◆ get()

GlobalVarConfig::get (   $name)
See also
Config::get

Implements Config.

Definition at line 50 of file GlobalVarConfig.php.

References $name, and getWithPrefix().

◆ getWithPrefix()

GlobalVarConfig::getWithPrefix (   $prefix,
  $name 
)
protected

Get a variable with a given prefix, if not the defaults.

Parameters
string$prefixPrefix to use on the variable, if one.
string$nameVariable name without prefix
Exceptions
ConfigException
Returns
mixed

Definition at line 69 of file GlobalVarConfig.php.

References $GLOBALS, $name, and $prefix.

Referenced by get().

◆ newInstance()

static GlobalVarConfig::newInstance ( )
static

Default builder function.

Returns
GlobalVarConfig

Definition at line 39 of file GlobalVarConfig.php.

◆ set()

GlobalVarConfig::set (   $name,
  $value 
)
See also
Config::set

Implements Config.

Definition at line 57 of file GlobalVarConfig.php.

References $name, $value, and setWithPrefix().

◆ setWithPrefix()

GlobalVarConfig::setWithPrefix (   $prefix,
  $name,
  $value 
)
protected

Get a variable with a given prefix, if not the defaults.

Parameters
string$prefixPrefix to use on the variable
string$nameVariable name without prefix
mixed$valuevalue to set

Definition at line 84 of file GlobalVarConfig.php.

References $GLOBALS, $name, $prefix, and $value.

Referenced by set().

Member Data Documentation

◆ $prefix

string GlobalVarConfig::$prefix
private

Prefix to use for configuration variables.

Definition at line 33 of file GlobalVarConfig.php.

Referenced by __construct(), getWithPrefix(), and setWithPrefix().


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