MediaWiki  REL1_24
LockManagerGroup Class Reference

Class to handle file lock manager registration. More...

Collaboration diagram for LockManagerGroup:

List of all members.

Public Member Functions

 config ($name)
 Get the config array for a lock manager object with a given name.
 get ($name)
 Get the lock manager object with a given name.
 getAny ()
 Get the default lock manager configured for the site or at least some other effective configured lock manager.
 getDefault ()
 Get the default lock manager configured for the site.

Static Public Member Functions

static destroySingletons ()
 Destroy the singleton instances.
static singleton ($domain=false)

Protected Member Functions

 __construct ($domain)
 initFromGlobals ()
 Register lock managers from the global variables.
 register (array $configs)
 Register an array of file lock manager configurations.

Protected Attributes

 $domain
array $managers = array()
 Array of (name => ('class' => ..., 'config' => ..., 'instance' => ...)) *.

Static Protected Attributes

static $instances = array()

Detailed Description

Class to handle file lock manager registration.

Author:
Aaron Schulz
Since:
1.19

Definition at line 31 of file LockManagerGroup.php.


Constructor & Destructor Documentation

LockManagerGroup::__construct ( domain) [protected]
Parameters:
string$domainDomain (usually wiki ID)

Definition at line 42 of file LockManagerGroup.php.


Member Function Documentation

Get the config array for a lock manager object with a given name.

Parameters:
string$name
Returns:
array
Exceptions:
MWException

Definition at line 130 of file LockManagerGroup.php.

Destroy the singleton instances.

Definition at line 63 of file LockManagerGroup.php.

Referenced by ForkController\prepareEnvironment().

LockManagerGroup::get ( name)

Get the lock manager object with a given name.

Parameters:
string$name
Returns:
LockManager
Exceptions:
MWException

Definition at line 109 of file LockManagerGroup.php.

Get the default lock manager configured for the site or at least some other effective configured lock manager.

Throws an exception if no lock manager could be found.

Returns:
LockManager
Exceptions:
MWException

Definition at line 159 of file LockManagerGroup.php.

Get the default lock manager configured for the site.

Returns NullLockManager if no lock manager could be found.

Returns:
LockManager

Definition at line 145 of file LockManagerGroup.php.

Register lock managers from the global variables.

Definition at line 70 of file LockManagerGroup.php.

LockManagerGroup::register ( array configs) [protected]

Register an array of file lock manager configurations.

Parameters:
array$configs
Exceptions:
MWException

Definition at line 82 of file LockManagerGroup.php.

static LockManagerGroup::singleton ( domain = false) [static]
Parameters:
bool | string$domainDomain (usually wiki ID). Default: false.
Returns:
LockManagerGroup

Definition at line 50 of file LockManagerGroup.php.

Referenced by FSRepo\__construct(), and StoreBatchTest\setUp().


Member Data Documentation

LockManagerGroup::$domain [protected]

Definition at line 35 of file LockManagerGroup.php.

LockManagerGroup::$instances = array() [static, protected]

Definition at line 33 of file LockManagerGroup.php.

array LockManagerGroup::$managers = array() [protected]

Array of (name => ('class' => ..., 'config' => ..., 'instance' => ...)) *.

Definition at line 37 of file LockManagerGroup.php.


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