MediaWiki  1.33.0
ExternalStoreMedium Class Reference

Accessable external objects in a particular storage medium. More...

Inheritance diagram for ExternalStoreMedium:

Public Member Functions

 __construct (array $params=[])
 
 batchFetchFromURLs (array $urls)
 Fetch data from given external store URLs. More...
 
 fetchFromURL ( $url)
 Fetch data from given external store URL. More...
 
 isReadOnly ( $location)
 Check if a given location is read-only. More...
 
 store ( $location, $data)
 Insert a data item into a given location. More...
 

Protected Attributes

array $params = []
 

Detailed Description

Accessable external objects in a particular storage medium.

Since
1.21

Definition at line 30 of file ExternalStoreMedium.php.

Constructor & Destructor Documentation

◆ __construct()

ExternalStoreMedium::__construct ( array  $params = [])
Parameters
array$paramsUsage context options:
  • wiki: the domain ID of the wiki this is being used for [optional]

Definition at line 38 of file ExternalStoreMedium.php.

References $params.

Member Function Documentation

◆ batchFetchFromURLs()

ExternalStoreMedium::batchFetchFromURLs ( array  $urls)

Fetch data from given external store URLs.

Parameters
array$urlsA list of external store URLs
Returns
array Map from the url to the text stored. Unfound data is not represented

Reimplemented in ExternalStoreDB, and ExternalStoreMwstore.

Definition at line 57 of file ExternalStoreMedium.php.

References $data, as, and fetchFromURL().

◆ fetchFromURL()

ExternalStoreMedium::fetchFromURL (   $url)
abstract

Fetch data from given external store URL.

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

Reimplemented in ExternalStoreDB, ExternalStoreMwstore, and ExternalStoreHttp.

Referenced by batchFetchFromURLs().

◆ isReadOnly()

ExternalStoreMedium::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 in ExternalStoreDB, ExternalStoreHttp, and ExternalStoreMwstore.

Definition at line 88 of file ExternalStoreMedium.php.

◆ store()

ExternalStoreMedium::store (   $location,
  $data 
)
abstract

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
MWException

Reimplemented in ExternalStoreDB, ExternalStoreHttp, and ExternalStoreMwstore.

Member Data Documentation

◆ $params

array ExternalStoreMedium::$params = []
protected

Definition at line 32 of file ExternalStoreMedium.php.

Referenced by __construct().


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