MediaWiki
REL1_39
ExternalStoreHttp.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\MediaWikiServices
;
22
32
class
ExternalStoreHttp
extends
ExternalStoreMedium
{
33
public
function
fetchFromURL
( $url ) {
34
return
MediaWikiServices::getInstance()->getHttpRequestFactory()->
35
get
( $url, [], __METHOD__ );
36
}
37
38
public
function
store
( $location, $data ) {
39
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
40
throw
new
MWException
(
"ExternalStoreHttp is read-only and does not support store()."
);
41
}
42
43
public
function
isReadOnly
( $location ) {
44
return
true
;
45
}
46
}
ExternalStoreHttp
External storage using HTTP requests.
Definition
ExternalStoreHttp.php:32
ExternalStoreHttp\store
store( $location, $data)
Insert a data item into a given location.
Definition
ExternalStoreHttp.php:38
ExternalStoreHttp\isReadOnly
isReadOnly( $location)
Check if a given location is read-only.
Definition
ExternalStoreHttp.php:43
ExternalStoreHttp\fetchFromURL
fetchFromURL( $url)
Fetch data from given external store URL.
Definition
ExternalStoreHttp.php:33
ExternalStoreMedium
Base class for external storage.
Definition
ExternalStoreMedium.php:36
MWException
MediaWiki exception.
Definition
MWException.php:29
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:212
includes
externalstore
ExternalStoreHttp.php
Generated on Mon Nov 25 2024 06:55:32 for MediaWiki by
1.10.0