MediaWiki REL1_31
ExternalStoreHttp Class Reference

Example class for HTTP accessible external objects. More...

Inheritance diagram for ExternalStoreHttp:
Collaboration diagram for ExternalStoreHttp:

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Example class for HTTP accessible external objects.

Only supports reading, not storing.

Definition at line 29 of file ExternalStoreHttp.php.

Member Function Documentation

◆ fetchFromURL()

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
MWException

Reimplemented from ExternalStoreMedium.

Definition at line 30 of file ExternalStoreHttp.php.

References Http\get().

◆ isReadOnly()

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

Definition at line 38 of file ExternalStoreHttp.php.

◆ store()

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
MWException

Reimplemented from ExternalStoreMedium.

Definition at line 34 of file ExternalStoreHttp.php.


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