|
MediaWiki master
|
Base class for external storage. More...
Inherits LoggerAwareInterface.
Inherited by MediaWiki\ExternalStore\ExternalStoreDB, MediaWiki\ExternalStore\ExternalStoreHttp, MediaWiki\ExternalStore\ExternalStoreMemory, and MediaWiki\ExternalStore\ExternalStoreMwstore.

Public Member Functions | |
| __construct (array $params) | |
| batchFetchFromURLs (array $urls) | |
| Fetch data from given external store URLs. | |
| fetchFromURL ( $url) | |
| Fetch data from given external store URL. | |
| isReadOnly ( $location) | |
| Check if a given location is read-only. | |
| setLogger (LoggerInterface $logger) | |
| store ( $location, $data) | |
| Insert a data item into a given location. | |
Protected Attributes | |
| string | $dbDomain |
| Default database domain to store content under. | |
| bool | $isDbDomainExplicit |
| Whether this was factoried with an explicit DB domain. | |
| LoggerInterface | $logger |
| array | $params = [] |
| Usage context options for this instance. | |
Base class for external storage.
There can be multiple "locations" for a storage medium type (e.g. DB clusters, filesystems). Blobs are stored under URLs of the form <protocol>://<location>/<path>. Each type of storage medium has an associated protocol.
Definition at line 25 of file ExternalStoreMedium.php.
| MediaWiki\ExternalStore\ExternalStoreMedium::__construct | ( | array | $params | ) |
| array | $params | Usage context options for this instance:
|
Reimplemented in MediaWiki\ExternalStore\ExternalStoreDB, and MediaWiki\ExternalStore\ExternalStoreMwstore.
Definition at line 42 of file ExternalStoreMedium.php.
References MediaWiki\ExternalStore\ExternalStoreMedium\$params.
| MediaWiki\ExternalStore\ExternalStoreMedium::batchFetchFromURLs | ( | array | $urls | ) |
Fetch data from given external store URLs.
| array | $urls | A list of external store URLs |
Reimplemented in MediaWiki\ExternalStore\ExternalStoreDB, MediaWiki\ExternalStore\ExternalStoreMemory, and MediaWiki\ExternalStore\ExternalStoreMwstore.
Definition at line 73 of file ExternalStoreMedium.php.
References $url.
|
abstract |
Fetch data from given external store URL.
| string | $url | An external store URL |
| ExternalStoreException |
Reimplemented in MediaWiki\ExternalStore\ExternalStoreDB, MediaWiki\ExternalStore\ExternalStoreHttp, MediaWiki\ExternalStore\ExternalStoreMemory, and MediaWiki\ExternalStore\ExternalStoreMwstore.
| MediaWiki\ExternalStore\ExternalStoreMedium::isReadOnly | ( | $location | ) |
Check if a given location is read-only.
| string | $location | The location name |
Reimplemented in MediaWiki\ExternalStore\ExternalStoreMwstore, MediaWiki\ExternalStore\ExternalStoreDB, and MediaWiki\ExternalStore\ExternalStoreHttp.
Definition at line 103 of file ExternalStoreMedium.php.
| MediaWiki\ExternalStore\ExternalStoreMedium::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 54 of file ExternalStoreMedium.php.
|
abstract |
Insert a data item into a given location.
| string | $location | The location name |
| string | $data | The data item |
| ExternalStoreException |
Reimplemented in MediaWiki\ExternalStore\ExternalStoreMwstore, MediaWiki\ExternalStore\ExternalStoreDB, MediaWiki\ExternalStore\ExternalStoreHttp, and MediaWiki\ExternalStore\ExternalStoreMemory.
|
protected |
Default database domain to store content under.
Definition at line 29 of file ExternalStoreMedium.php.
Referenced by MediaWiki\ExternalStore\ExternalStoreMemory\fetchFromURL(), and MediaWiki\ExternalStore\ExternalStoreMemory\store().
|
protected |
Whether this was factoried with an explicit DB domain.
Definition at line 31 of file ExternalStoreMedium.php.
|
protected |
Definition at line 34 of file ExternalStoreMedium.php.
|
protected |
Usage context options for this instance.
Definition at line 27 of file ExternalStoreMedium.php.
Referenced by MediaWiki\ExternalStore\ExternalStoreDB\__construct(), MediaWiki\ExternalStore\ExternalStoreMedium\__construct(), and MediaWiki\ExternalStore\ExternalStoreMwstore\__construct().