MediaWiki  REL1_24
LBFactoryFake Class Reference

LBFactory class that throws an error on any attempt to use it. More...

Inheritance diagram for LBFactoryFake:
Collaboration diagram for LBFactoryFake:

List of all members.

Public Member Functions

 __construct ($conf)
 Construct a factory based on a configuration array (typically from $wgLBFactoryConf)
 forEachLB ($callback, $params=array())
 Execute a function for each tracked load balancer The callback is called with the load balancer as the first parameter, and $params passed as the subsequent parameters.
getExternalLB ($cluster, $wiki=false)
 Get a cached (tracked) load balancer for external storage.
 getMainLB ($wiki=false)
 Get a cached (tracked) load balancer object.
 newExternalLB ($cluster, $wiki=false)
 Create a new load balancer for external storage.
 newMainLB ($wiki=false)
 Create a new load balancer object.

Detailed Description

LBFactory class that throws an error on any attempt to use it.

This will typically be done via wfGetDB(). Call LBFactory::disableBackend() to start using this, and LBFactory::enableBackend() to return to normal behavior

Definition at line 351 of file LBFactory.php.


Constructor & Destructor Documentation

Construct a factory based on a configuration array (typically from $wgLBFactoryConf)

Parameters:
array$conf

Reimplemented from LBFactory.

Definition at line 352 of file LBFactory.php.


Member Function Documentation

LBFactoryFake::forEachLB ( callback,
params = array() 
)

Execute a function for each tracked load balancer The callback is called with the load balancer as the first parameter, and $params passed as the subsequent parameters.

Parameters:
callable$callback
array$params

Reimplemented from LBFactory.

Definition at line 371 of file LBFactory.php.

& LBFactoryFake::getExternalLB ( cluster,
wiki = false 
)

Get a cached (tracked) load balancer for external storage.

Parameters:
string$clusterExternal storage cluster, or false for core
bool | string$wikiWiki ID, or false for the current wiki
Returns:
LoadBalancer

Reimplemented from LBFactory.

Definition at line 367 of file LBFactory.php.

Get a cached (tracked) load balancer object.

Parameters:
bool | string$wikiWiki ID, or false for the current wiki
Returns:
LoadBalancer

Reimplemented from LBFactory.

Definition at line 359 of file LBFactory.php.

LBFactoryFake::newExternalLB ( cluster,
wiki = false 
)

Create a new load balancer for external storage.

The resulting object will be untracked, not chronology-protected, and the caller is responsible for cleaning it up.

Parameters:
string$clusterExternal storage cluster, or false for core
bool | string$wikiWiki ID, or false for the current wiki
Returns:
LoadBalancer

Reimplemented from LBFactory.

Definition at line 363 of file LBFactory.php.

Create a new load balancer object.

The resulting object will be untracked, not chronology-protected, and the caller is responsible for cleaning it up.

Parameters:
bool | string$wikiWiki ID, or false for the current wiki
Returns:
LoadBalancer

Reimplemented from LBFactory.

Definition at line 355 of file LBFactory.php.


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