MediaWiki
1.34.0
|
Public Member Functions | |
__construct (array $externalStores, array $defaultStores, $localDomainId, LoggerInterface $logger=null) | |
getProtocols () | |
getStore ( $proto, array $params=[]) | |
Get an external store object of the given type, with the given parameters. More... | |
getStoreForUrl ( $url, array $params=[]) | |
Get the ExternalStoreMedium for a given URL. More... | |
getStoreLocationFromUrl ( $url) | |
Get the location within the appropriate store for a given a URL. More... | |
getUrlsByProtocol (array $urls) | |
getWriteBaseUrls () | |
setLogger (LoggerInterface $logger) | |
Static Private Member Functions | |
static | splitStorageUrl ( $storeUrl) |
Private Attributes | |
string | $localDomainId |
Default database domain to store content under. More... | |
LoggerInterface | $logger |
string[] | $protocols |
List of storage access protocols. More... | |
string[] | $writeBaseUrls |
List of base storage URLs that define locations for writes. More... | |
Definition at line 15 of file ExternalStoreFactory.php.
ExternalStoreFactory::__construct | ( | array | $externalStores, |
array | $defaultStores, | ||
$localDomainId, | |||
LoggerInterface | $logger = null |
||
) |
string[] | $externalStores | See $wgExternalStores |
string[] | $defaultStores | See $wgDefaultExternalStore |
string | $localDomainId | Local database/wiki ID |
LoggerInterface | null | $logger |
Definition at line 31 of file ExternalStoreFactory.php.
References $localDomainId, and $logger.
ExternalStoreFactory::getProtocols | ( | ) |
Definition at line 53 of file ExternalStoreFactory.php.
References $protocols.
ExternalStoreFactory::getStore | ( | $proto, | |
array | $params = [] |
||
) |
Get an external store object of the given type, with the given parameters.
The 'domain' field in $params will be set to the local DB domain if it is unset or false. A special 'isDomainImplicit' flag is set when this happens, which should only be used to handle legacy DB domain configuration concerns (e.g. T200471).
string | $proto | Type of external storage, should be a value in $wgExternalStores |
array | $params | Map of ExternalStoreMedium::__construct context parameters. |
ExternalStoreException | When $proto is not recognized |
Definition at line 77 of file ExternalStoreFactory.php.
References $localDomainId, $logger, and FileBackendGroup\singleton().
Referenced by getStoreForUrl().
ExternalStoreFactory::getStoreForUrl | ( | $url, | |
array | $params = [] |
||
) |
Get the ExternalStoreMedium for a given URL.
$url is either of the form:
string | $url | |
array | $params | Map of ExternalStoreMedium::__construct context parameters |
ExternalStoreException | When the protocol is missing or not recognized |
Definition at line 121 of file ExternalStoreFactory.php.
References $path, getStore(), and splitStorageUrl().
ExternalStoreFactory::getStoreLocationFromUrl | ( | $url | ) |
Get the location within the appropriate store for a given a URL.
string | $url |
ExternalStoreException |
Definition at line 138 of file ExternalStoreFactory.php.
References splitStorageUrl().
ExternalStoreFactory::getUrlsByProtocol | ( | array | $urls | ) |
string[] | $urls |
ExternalStoreException |
Definition at line 153 of file ExternalStoreFactory.php.
References splitStorageUrl().
ExternalStoreFactory::getWriteBaseUrls | ( | ) |
Definition at line 61 of file ExternalStoreFactory.php.
References $writeBaseUrls.
ExternalStoreFactory::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 45 of file ExternalStoreFactory.php.
References $logger.
|
staticprivate |
string | $storeUrl |
ExternalStoreException |
Definition at line 168 of file ExternalStoreFactory.php.
Referenced by getStoreForUrl(), getStoreLocationFromUrl(), and getUrlsByProtocol().
|
private |
Default database domain to store content under.
Definition at line 21 of file ExternalStoreFactory.php.
Referenced by __construct(), and getStore().
|
private |
Definition at line 23 of file ExternalStoreFactory.php.
Referenced by __construct(), getStore(), and setLogger().
|
private |
List of storage access protocols.
Definition at line 17 of file ExternalStoreFactory.php.
Referenced by getProtocols().
|
private |
List of base storage URLs that define locations for writes.
Definition at line 19 of file ExternalStoreFactory.php.
Referenced by getWriteBaseUrls().