MediaWiki
REL1_37
ExternalStoreHttp.php
Go to the documentation of this file.
1
<?php
23
use
MediaWiki\MediaWikiServices
;
24
31
class
ExternalStoreHttp
extends
ExternalStoreMedium
{
32
public
function
fetchFromURL
( $url ) {
33
return
MediaWikiServices::getInstance()->getHttpRequestFactory()->
34
get
( $url, [], __METHOD__ );
35
}
36
37
public
function
store
( $location, $data ) {
38
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
39
throw
new
MWException
(
"ExternalStoreHttp is read-only and does not support store()."
);
40
}
41
42
public
function
isReadOnly
( $location ) {
43
return
true
;
44
}
45
}
ExternalStoreHttp
Example class for HTTP accessible external objects.
Definition
ExternalStoreHttp.php:31
ExternalStoreHttp\store
store( $location, $data)
Insert a data item into a given location.
Definition
ExternalStoreHttp.php:37
ExternalStoreHttp\isReadOnly
isReadOnly( $location)
Check if a given location is read-only.
Definition
ExternalStoreHttp.php:42
ExternalStoreHttp\fetchFromURL
fetchFromURL( $url)
Fetch data from given external store URL.
Definition
ExternalStoreHttp.php:32
ExternalStoreMedium
Key/value blob storage for a particular storage medium type (e.g.
Definition
ExternalStoreMedium.php:38
MWException
MediaWiki exception.
Definition
MWException.php:29
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition
MediaWikiServices.php:190
includes
externalstore
ExternalStoreHttp.php
Generated on Fri Apr 5 2024 23:40:15 for MediaWiki by
1.9.8