MediaWiki REL1_39
LockManagerGroup Class Reference

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

Public Member Functions

 __construct ( $domain, array $lockManagerConfigs)
 Do not call this directly.
 
 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.
 

Protected Attributes

string $domain
 domain (usually wiki ID)
 
array $managers = []
 Array of (name => ('class' => ..., 'config' => ..., 'instance' => ...))
 

Detailed Description

Class to handle file lock manager registration.

Since
1.19

Definition at line 31 of file LockManagerGroup.php.

Constructor & Destructor Documentation

◆ __construct()

LockManagerGroup::__construct ( $domain,
array $lockManagerConfigs )

Do not call this directly.

Use LockManagerGroupFactory.

Parameters
string$domainDomain (usually wiki ID)
array[]$lockManagerConfigsIn format of $wgLockManagers

Definition at line 44 of file LockManagerGroup.php.

Member Function Documentation

◆ config()

LockManagerGroup::config ( $name)

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

Parameters
string$name
Returns
array
Exceptions
Exception

Definition at line 97 of file LockManagerGroup.php.

◆ get()

LockManagerGroup::get ( $name)

Get the lock manager object with a given name.

Parameters
string$name
Returns
LockManager
Exceptions
Exception

Definition at line 73 of file LockManagerGroup.php.

◆ getAny()

LockManagerGroup::getAny ( )

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.

Deprecated
since 1.35, seemingly unused, just call get() and catch any exception instead
Returns
LockManager
Exceptions
Exception

Definition at line 132 of file LockManagerGroup.php.

References wfDeprecated().

◆ getDefault()

LockManagerGroup::getDefault ( )

Get the default lock manager configured for the site.

Returns NullLockManager if no lock manager could be found.

Deprecated
since 1.35, seemingly unused, just call get() and catch any exception instead
Returns
LockManager

Definition at line 114 of file LockManagerGroup.php.

References wfDeprecated().

Member Data Documentation

◆ $domain

string LockManagerGroup::$domain
protected

domain (usually wiki ID)

Definition at line 33 of file LockManagerGroup.php.

◆ $managers

array LockManagerGroup::$managers = []
protected

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

Definition at line 36 of file LockManagerGroup.php.


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