MediaWiki
REL1_35
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
throw
new
MWException
(
"ExternalStoreHttp is read-only and does not support store()."
);
39
}
40
41
public
function
isReadOnly
( $location ) {
42
return
true
;
43
}
44
}
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:41
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:152
includes
externalstore
ExternalStoreHttp.php
Generated on Sat Apr 6 2024 00:07:09 for MediaWiki by
1.9.8