MediaWiki  REL1_31
ExternalStoreMwstore Class Reference

File backend accessible external objects. More...

Inheritance diagram for ExternalStoreMwstore:
Collaboration diagram for ExternalStoreMwstore:

Public Member Functions

 batchFetchFromURLs (array $urls)
 Fetch data from given external store URLs. More...
 
 fetchFromURL ( $url)
 The URL returned is of the form of the form mwstore://backend/container/wiki/id. More...
 
 isReadOnly ( $backend)
 Check if a given location is read-only. More...
 
 store ( $backend, $data)
 Insert a data item into a given location. More...
 
- Public Member Functions inherited from ExternalStoreMedium
 __construct (array $params=[])
 

Additional Inherited Members

- Protected Attributes inherited from ExternalStoreMedium
array $params = []
 

Detailed Description

File backend accessible external objects.

In this system, each store "location" maps to the name of a file backend. The file backends must be defined in $wgFileBackends and must be global and fully qualified with a global "wikiId" prefix in the configuration.

Since
1.21

Definition at line 33 of file ExternalStoreMwstore.php.

Member Function Documentation

◆ batchFetchFromURLs()

ExternalStoreMwstore::batchFetchFromURLs ( array  $urls)

Fetch data from given external store URLs.

The URL returned is of the form of the form mwstore://backend/container/wiki/id

Parameters
array$urlsAn array of external store URLs
Returns
array A map from url to stored content. Failed results are not represented.

Reimplemented from ExternalStoreMedium.

Definition at line 59 of file ExternalStoreMwstore.php.

References $urls, as, and FileBackendGroup\singleton().

◆ fetchFromURL()

ExternalStoreMwstore::fetchFromURL (   $url)

The URL returned is of the form of the form mwstore://backend/container/wiki/id.

See also
ExternalStoreMedium::fetchFromURL()
Parameters
string$url
Returns
bool

Reimplemented from ExternalStoreMedium.

Definition at line 41 of file ExternalStoreMwstore.php.

References FileBackendGroup\singleton().

◆ isReadOnly()

ExternalStoreMwstore::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 ExternalStoreMedium.

Definition at line 100 of file ExternalStoreMwstore.php.

References FileBackendGroup\singleton().

◆ store()

ExternalStoreMwstore::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
MWException

Reimplemented from ExternalStoreMedium.

Definition at line 76 of file ExternalStoreMwstore.php.

References UIDGenerator\newTimestampedUID128(), FileBackendGroup\singleton(), and wfWikiID().


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