|
MediaWiki master
|
This is the main interface for fetching or inserting objects with ExternalStore. More...
Inherits LoggerAwareInterface.

Public Member Functions | |
| __construct (ExternalStoreFactory $factory, ?LoggerInterface $logger=null) | |
| fetchFromURL ( $url, array $params=[]) | |
| Fetch data from given URL. | |
| fetchFromURLs (array $urls, array $params=[]) | |
| Fetch data from multiple URLs with a minimum of round trips. | |
| insert ( $data, array $params=[], ?array $tryStores=null) | |
| Insert data into storage and return the assigned URL. | |
| isReadOnly ( $storeUrls=null) | |
| setLogger (LoggerInterface $logger) | |
This is the main interface for fetching or inserting objects with ExternalStore.
This interface is meant to mimic the ExternalStoreMedium base class (which represents a single external store protocol), and transparently uses the right instance of that class when fetching by URL.
Definition at line 32 of file ExternalStoreAccess.php.
| MediaWiki\ExternalStore\ExternalStoreAccess::__construct | ( | ExternalStoreFactory | $factory, |
| ?LoggerInterface | $logger = null ) |
| ExternalStoreFactory | $factory | |
| LoggerInterface | null | $logger |
Definition at line 42 of file ExternalStoreAccess.php.
| MediaWiki\ExternalStore\ExternalStoreAccess::fetchFromURL | ( | $url, | |
| array | $params = [] ) |
Fetch data from given URL.
| string | $url | The URL of the text to get |
| array | $params | Map of context parameters; same as ExternalStoreFactory::getStore() |
| ExternalStoreException |
Definition at line 61 of file ExternalStoreAccess.php.
References $url.
| MediaWiki\ExternalStore\ExternalStoreAccess::fetchFromURLs | ( | array | $urls, |
| array | $params = [] ) |
Fetch data from multiple URLs with a minimum of round trips.
| array | $urls | The URLs of the text to get |
| array | $params | Map of context parameters; same as ExternalStoreFactory::getStore() |
| ExternalStoreException |
Definition at line 75 of file ExternalStoreAccess.php.
References $url.
| MediaWiki\ExternalStore\ExternalStoreAccess::insert | ( | $data, | |
| array | $params = [], | ||
| ?array | $tryStores = null ) |
Insert data into storage and return the assigned URL.
This will randomly pick one of the available write storage locations to put the data. It will keep failing-over to any untried storage locations whenever one location is not usable.
| string | $data | |
| array | $params | Map of context parameters; same as ExternalStoreFactory::getStore() |
| string[] | null | $tryStores | Base URLs to try, e.g. [ "DB://cluster1" ] |
| ExternalStoreException |
Definition at line 106 of file ExternalStoreAccess.php.
References $url.
| MediaWiki\ExternalStore\ExternalStoreAccess::isReadOnly | ( | $storeUrls = null | ) |
| string[] | string | null | $storeUrls | Base URL(s) to check, e.g. [ "DB://cluster1" ] |
| ExternalStoreException |
Definition at line 173 of file ExternalStoreAccess.php.
| MediaWiki\ExternalStore\ExternalStoreAccess::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 47 of file ExternalStoreAccess.php.