MediaWiki  1.23.2
FileBackendGroup Class Reference

Class to handle file backend registration. More...

Public Member Functions

 backendFromPath ( $storagePath)
 Get an appropriate backend object from a storage path. More...
 
 config ( $name)
 Get the config array for a backend object with a given name. More...
 
 get ( $name)
 Get the backend object with a given name. More...
 

Static Public Member Functions

static destroySingleton ()
 Destroy the singleton instance. More...
 
static singleton ()
 

Protected Member Functions

 __construct ()
 
 initFromGlobals ()
 Register file backends from the global variables. More...
 
 register (array $configs)
 Register an array of file backend configurations. More...
 

Protected Attributes

array $backends = array()
 (name => ('class' => string, 'config' => array, 'instance' => object)) * More...
 

Static Protected Attributes

static $instance = null
 

Detailed Description

Class to handle file backend registration.

Since
1.19

Definition at line 31 of file FileBackendGroup.php.

Constructor & Destructor Documentation

◆ __construct()

FileBackendGroup::__construct ( )
protected

Definition at line 37 of file FileBackendGroup.php.

Member Function Documentation

◆ backendFromPath()

FileBackendGroup::backendFromPath (   $storagePath)

Get an appropriate backend object from a storage path.

Parameters
string$storagePath
Returns
FileBackend|null Backend or null on failure

Definition at line 190 of file FileBackendGroup.php.

References list, and FileBackend\splitStoragePath().

◆ config()

FileBackendGroup::config (   $name)

Get the config array for a backend object with a given name.

Parameters
string$name
Returns
array
Exceptions
FileBackendException

Definition at line 175 of file FileBackendGroup.php.

References $name, and array().

◆ destroySingleton()

static FileBackendGroup::destroySingleton ( )
static

Destroy the singleton instance.

Definition at line 55 of file FileBackendGroup.php.

Referenced by ForkController\prepareEnvironment(), UploadFromUrlTestSuite\setUp(), and UploadFromUrlTestSuite\tearDown().

◆ get()

FileBackendGroup::get (   $name)

Get the backend object with a given name.

Parameters
string$name
Returns
FileBackend
Exceptions
FileBackendException

Definition at line 146 of file FileBackendGroup.php.

References $name, array(), FileJournal\factory(), LockManagerGroup\singleton(), and wfWikiID().

◆ initFromGlobals()

FileBackendGroup::initFromGlobals ( )
protected

Register file backends from the global variables.

Definition at line 62 of file FileBackendGroup.php.

References array(), as, and global.

◆ register()

FileBackendGroup::register ( array  $configs)
protected

Register an array of file backend configurations.

Parameters
array$configs
Exceptions
FileBackendException

Definition at line 117 of file FileBackendGroup.php.

References $name, array(), and as.

◆ singleton()

Member Data Documentation

◆ $backends

array FileBackendGroup::$backends = array()
protected

(name => ('class' => string, 'config' => array, 'instance' => object)) *

Definition at line 35 of file FileBackendGroup.php.

◆ $instance

FileBackendGroup::$instance = null
staticprotected

Definition at line 33 of file FileBackendGroup.php.

Referenced by singleton().


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