MediaWiki  REL1_24
GlobalVarConfig Class Reference

Accesses configuration settings from $GLOBALS. More...

Inheritance diagram for GlobalVarConfig:
Collaboration diagram for GlobalVarConfig:

List of all members.

Public Member Functions

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

Static Public Member Functions

static newInstance ()
 Default builder function.

Protected Member Functions

 getWithPrefix ($prefix, $name)
 Get a variable with a given prefix, if not the defaults.
 hasWithPrefix ($prefix, $name)
 Check if a variable with a given prefix is set.
 setWithPrefix ($prefix, $name, $value)
 Get a variable with a given prefix, if not the defaults.

Private Attributes

string $prefix
 Prefix to use for configuration variables.

Detailed Description

Accesses configuration settings from $GLOBALS.

Since:
1.23

Definition at line 28 of file GlobalVarConfig.php.


Constructor & Destructor Documentation

GlobalVarConfig::__construct ( prefix = 'wg')

Definition at line 43 of file GlobalVarConfig.php.

References $prefix.


Member Function Documentation

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

Implements Config.

Definition at line 50 of file GlobalVarConfig.php.

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
Returns:
mixed

Definition at line 80 of file GlobalVarConfig.php.

GlobalVarConfig::has ( name)
See also:
Config::has

Implements Config.

Definition at line 60 of file GlobalVarConfig.php.

GlobalVarConfig::hasWithPrefix ( prefix,
name 
) [protected]

Check if a variable with a given prefix is set.

Parameters:
string$prefixPrefix to use on the variable
string$nameVariable name without prefix
Returns:
bool

Definition at line 91 of file GlobalVarConfig.php.

static GlobalVarConfig::newInstance ( ) [static]

Default builder function.

Returns:
GlobalVarConfig

Definition at line 39 of file GlobalVarConfig.php.

Referenced by GlobalVarConfigTest\testNewInstance().

GlobalVarConfig::set ( name,
value 
)
See also:
MutableConfig::set
Deprecated:
since 1.24

Definition at line 68 of file GlobalVarConfig.php.

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
Deprecated:
since 1.24

Definition at line 104 of file GlobalVarConfig.php.


Member Data Documentation

string GlobalVarConfig::$prefix [private]

Prefix to use for configuration variables.

Definition at line 33 of file GlobalVarConfig.php.

Referenced by __construct().


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