MediaWiki master
MediaWiki\ExternalStore\ExternalStoreHttp Class Reference

External storage using HTTP requests. More...

Inherits MediaWiki\ExternalStore\ExternalStoreMedium.

Collaboration diagram for MediaWiki\ExternalStore\ExternalStoreHttp:

Public Member Functions

 fetchFromURL ( $url)
 Fetch data from given external store URL.
Parameters
string$urlAn external store URL
Returns
string|bool The text stored or false on error
Exceptions
ExternalStoreException

 
 isReadOnly ( $location)
 Check if a given location is read-only.
Parameters
string$locationThe location name
Returns
bool Whether this location is read-only
Since
1.31

 
 store ( $location, $data)
 Insert a data item into a given location.
Parameters
string$locationThe location name
string$dataThe data item
Returns
string|bool The URL of the stored data item, or false on error
Exceptions
ExternalStoreException

 
- Public Member Functions inherited from MediaWiki\ExternalStore\ExternalStoreMedium
 __construct (array $params)
 
 batchFetchFromURLs (array $urls)
 Fetch data from given external store URLs.
 
 setLogger (LoggerInterface $logger)
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\ExternalStore\ExternalStoreMedium
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.
 

Detailed Description

External storage using HTTP requests.

Example class for HTTP accessible external objects. Only supports reading, not storing.

See also
ExternalStoreAccess

Definition at line 21 of file ExternalStoreHttp.php.

Member Function Documentation

◆ fetchFromURL()

MediaWiki\ExternalStore\ExternalStoreHttp::fetchFromURL ( $url)

Fetch data from given external store URL.

Parameters
string$urlAn external store URL
Returns
string|bool The text stored or false on error
Exceptions
ExternalStoreException

Reimplemented from MediaWiki\ExternalStore\ExternalStoreMedium.

Definition at line 23 of file ExternalStoreHttp.php.

References $url, and MediaWiki\MediaWikiServices\getInstance().

◆ isReadOnly()

MediaWiki\ExternalStore\ExternalStoreHttp::isReadOnly ( $location)

Check if a given location is read-only.

Parameters
string$locationThe location name
Returns
bool Whether this location is read-only
Since
1.31

Reimplemented from MediaWiki\ExternalStore\ExternalStoreMedium.

Definition at line 35 of file ExternalStoreHttp.php.

◆ store()

MediaWiki\ExternalStore\ExternalStoreHttp::store ( $location,
$data )

Insert a data item into a given location.

Parameters
string$locationThe location name
string$dataThe data item
Returns
string|bool The URL of the stored data item, or false on error
Exceptions
ExternalStoreException

Reimplemented from MediaWiki\ExternalStore\ExternalStoreMedium.

Definition at line 29 of file ExternalStoreHttp.php.


The documentation for this class was generated from the following file: