MediaWiki
1.34.0
|
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... | |
guessMimeInternal ( $storagePath, $content, $fsPath) | |
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, $readOnlyReason=null) | |
Register an array of file backend configurations. More... | |
Protected Attributes | |
array | $backends = [] |
(name => ('class' => string, 'config' => array, 'instance' => object)) More... | |
Static Protected Attributes | |
static FileBackendGroup | $instance = null |
Class to handle file backend registration.
Definition at line 33 of file FileBackendGroup.php.
|
protected |
Definition at line 40 of file FileBackendGroup.php.
FileBackendGroup::backendFromPath | ( | $storagePath | ) |
Get an appropriate backend object from a storage path.
string | $storagePath |
Definition at line 240 of file FileBackendGroup.php.
References FileBackend\splitStoragePath().
FileBackendGroup::config | ( | $name | ) |
Get the config array for a backend object with a given name.
string | $name |
InvalidArgumentException |
Definition at line 196 of file FileBackendGroup.php.
References FileJournal\factory(), ObjectCache\getLocalServerInstance(), Profiler\instance(), and LockManagerGroup\singleton().
Referenced by get().
|
static |
Destroy the singleton instance.
Definition at line 58 of file FileBackendGroup.php.
Referenced by ForkController\prepareEnvironment().
FileBackendGroup::get | ( | $name | ) |
Get the backend object with a given name.
string | $name |
InvalidArgumentException |
Definition at line 166 of file FileBackendGroup.php.
References config().
FileBackendGroup::guessMimeInternal | ( | $storagePath, | |
$content, | |||
$fsPath | |||
) |
string | $storagePath | |
string | null | $content | |
string | null | $fsPath |
Definition at line 256 of file FileBackendGroup.php.
References $content, $ext, $type, FileBackend\extensionFromPath(), and MediaWiki\MediaWikiServices\getInstance().
|
protected |
Register file backends from the global variables.
Definition at line 65 of file FileBackendGroup.php.
References $wgDirectoryMode, $wgFileBackends, $wgForeignFileRepos, $wgLocalFileRepo, and wfConfiguredReadOnlyReason().
|
protected |
Register an array of file backend configurations.
array[] | $configs | |
string | null | $readOnlyReason |
InvalidArgumentException |
Definition at line 113 of file FileBackendGroup.php.
References WikiMap\getCurrentWikiDbDomain(), WikiMap\getWikiIdFromDbDomain(), and wfWarn().
|
static |
Definition at line 46 of file FileBackendGroup.php.
References $instance.
Referenced by FileRepo\__construct(), FileOpPerfTest\execute(), SyncFileBackend\execute(), CopyFileBackend\execute(), FancyCaptcha\getBackend(), and ExternalStoreFactory\getStore().
|
protected |
(name => ('class' => string, 'config' => array, 'instance' => object))
Definition at line 38 of file FileBackendGroup.php.
|
staticprotected |
Definition at line 35 of file FileBackendGroup.php.
Referenced by singleton().