21use Psr\Log\LoggerAwareInterface;
22use Psr\Log\LoggerInterface;
23use Psr\Log\NullLogger;
55 if ( isset(
$params[
'domain'] ) ) {
56 $this->dbDomain =
$params[
'domain'];
57 $this->isDbDomainExplicit = empty(
$params[
'isDomainImplicit'] );
59 throw new InvalidArgumentException(
'Missing DB "domain" parameter.' );
62 $this->logger =
$params[
'logger'] ??
new NullLogger();
86 foreach ( $urls as $url ) {
89 if ( $data !==
false ) {
90 $retval[$url] = $data;
105 abstract public function store( $location, $data );
Base class for external storage.
array $params
Usage context options for this instance.
setLogger(LoggerInterface $logger)
fetchFromURL( $url)
Fetch data from given external store URL.
bool $isDbDomainExplicit
Whether this was factoried with an explicit DB domain.
store( $location, $data)
Insert a data item into a given location.
batchFetchFromURLs(array $urls)
Fetch data from given external store URLs.
isReadOnly( $location)
Check if a given location is read-only.
string $dbDomain
Default database domain to store content under.
__construct(array $params)