MediaWiki
1.34.0
|
Process memory based external objects for testing. More...
Public Member Functions | |
__construct (array $params) | |
batchFetchFromURLs (array $urls) | |
Fetch data from given external store URLs. More... | |
clear () | |
Remove all data from memory for this domain. More... | |
fetchFromURL ( $url) | |
Fetch data from given external store URL. More... | |
store ( $location, $data) | |
Insert a data item into a given location. More... | |
Public Member Functions inherited from ExternalStoreMedium | |
isReadOnly ( $location) | |
Check if a given location is read-only. More... | |
setLogger (LoggerInterface $logger) | |
Private Member Functions | |
getURLComponents ( $url) | |
Static Private Attributes | |
static array[] | $data = [] |
Map of (location => DB domain => id => value) More... | |
static int | $nextId = 0 |
Additional Inherited Members | |
Protected Attributes inherited from ExternalStoreMedium | |
string | $dbDomain |
Default database domain to store content under. More... | |
bool | $isDbDomainExplicit |
Whether this was factoried with an explicit DB domain. More... | |
LoggerInterface | $logger |
array | $params = [] |
Usage context options for this instance. More... | |
Process memory based external objects for testing.
In this system, each store "location" is separate PHP array. URLs are of the form "memory://location/id". The id/value pairs at each location are segregated by DB domain ID.
Definition at line 33 of file ExternalStoreMemory.php.
ExternalStoreMemory::__construct | ( | array | $params | ) |
array | $params | Usage context options for this instance:
|
Reimplemented from ExternalStoreMedium.
Definition at line 39 of file ExternalStoreMemory.php.
References ExternalStoreMedium\$params.
ExternalStoreMemory::batchFetchFromURLs | ( | array | $urls | ) |
Fetch data from given external store URLs.
array | $urls | A list of external store URLs |
Reimplemented from ExternalStoreMedium.
Definition at line 52 of file ExternalStoreMemory.php.
References $blob, and fetchFromURL().
ExternalStoreMemory::clear | ( | ) |
Remove all data from memory for this domain.
Definition at line 74 of file ExternalStoreMemory.php.
ExternalStoreMemory::fetchFromURL | ( | $url | ) |
Fetch data from given external store URL.
string | $url | An external store URL |
MWException |
Reimplemented from ExternalStoreMedium.
Definition at line 43 of file ExternalStoreMemory.php.
References ExternalStoreMedium\$dbDomain, and getURLComponents().
Referenced by batchFetchFromURLs().
|
private |
string | $url |
Definition at line 87 of file ExternalStoreMemory.php.
References $path.
Referenced by fetchFromURL().
ExternalStoreMemory::store | ( | $location, | |
$data | |||
) |
Insert a data item into a given location.
string | $location | The location name |
string | $data | The data item |
MWException |
Reimplemented from ExternalStoreMedium.
Definition at line 64 of file ExternalStoreMemory.php.
References $data, ExternalStoreMedium\$dbDomain, and $nextId.
|
staticprivate |
Map of (location => DB domain => id => value)
Definition at line 35 of file ExternalStoreMemory.php.
Referenced by store().
|
staticprivate |
Definition at line 37 of file ExternalStoreMemory.php.
Referenced by store().