|
MediaWiki
master
|
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 31 of file FileBackendGroup.php.
|
protected |
Definition at line 38 of file FileBackendGroup.php.
| FileBackendGroup::backendFromPath | ( | $storagePath | ) |
Get an appropriate backend object from a storage path.
| string | $storagePath |
Definition at line 199 of file FileBackendGroup.php.
References list, and FileBackend\splitStoragePath().
| FileBackendGroup::config | ( | $name | ) |
Get the config array for a backend object with a given name.
| string | $name |
| FileBackendException |
Definition at line 184 of file FileBackendGroup.php.
References $name.
|
static |
Destroy the singleton instance.
Definition at line 56 of file FileBackendGroup.php.
Referenced by MediaWikiTestCase\doLightweightServiceReset(), ForkController\prepareEnvironment(), UploadFromUrlTestSuite\setUp(), RepoGroupTest\setUpForeignRepo(), NewParserTest\setupGlobals(), UploadFromUrlTestSuite\tearDown(), NewParserTest\tearDown(), ParserTest\teardownGlobals(), RepoGroupTest\testForEachForeignRepoNone(), and RepoGroupTest\testHasForeignRepoNegative().
| FileBackendGroup::get | ( | $name | ) |
Get the backend object with a given name.
| string | $name |
| FileBackendException |
Definition at line 152 of file FileBackendGroup.php.
References $name, FileJournal\factory(), ObjectCache\getMainWANInstance(), LockManagerGroup\singleton(), and wfWikiID().
| FileBackendGroup::guessMimeInternal | ( | $storagePath, | |
| $content, | |||
| $fsPath | |||
| ) |
| string | $storagePath | |
| string | null | $content | |
| string | null | $fsPath |
Definition at line 215 of file FileBackendGroup.php.
References $content, $ext, $type, FileBackend\extensionFromPath(), TempFSFile\factory(), false, and MimeMagic\singleton().
|
protected |
Register file backends from the global variables.
Definition at line 63 of file FileBackendGroup.php.
References $wgFileBackends, $wgForeignFileRepos, $wgLocalFileRepo, as, global, and wfConfiguredReadOnlyReason().
|
protected |
Register an array of file backend configurations.
| array | $configs | |
| string | null | $readOnlyReason |
| FileBackendException |
Definition at line 119 of file FileBackendGroup.php.
|
static |
Definition at line 44 of file FileBackendGroup.php.
Referenced by FileBackendMultiWrite\__construct(), FileRepo\__construct(), ExternalStoreMwstore\batchFetchFromURLs(), TestFileOpPerformance\execute(), SyncFileBackend\execute(), CopyFileBackend\execute(), ExternalStoreMwstore\fetchFromURL(), FileBackendTest\provider_testGetContentType(), and ExternalStoreMwstore\store().
|
protected |
(name => ('class' => string, 'config' => array, 'instance' => object))
Definition at line 36 of file FileBackendGroup.php.
|
staticprotected |
Definition at line 33 of file FileBackendGroup.php.