MediaWiki
master
ExternalStoreHttp.php
Go to the documentation of this file.
1
<?php
7
namespace
MediaWiki\ExternalStore
;
8
9
use LogicException;
10
use
MediaWiki\MediaWikiServices
;
11
21
class
ExternalStoreHttp
extends
ExternalStoreMedium
{
23
public
function
fetchFromURL
(
$url
) {
24
return
MediaWikiServices::getInstance
()->getHttpRequestFactory()->
25
get
(
$url
, [], __METHOD__ );
26
}
27
29
public
function
store
( $location, $data ) {
30
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
31
throw
new
LogicException(
"ExternalStoreHttp is read-only and does not support store()."
);
32
}
33
35
public
function
isReadOnly
( $location ) {
36
return
true
;
37
}
38
}
39
41
class_alias( ExternalStoreHttp::class,
'ExternalStoreHttp'
);
MediaWiki\ExternalStore\ExternalStoreHttp
External storage using HTTP requests.
Definition
ExternalStoreHttp.php:21
MediaWiki\ExternalStore\ExternalStoreHttp\isReadOnly
isReadOnly( $location)
Check if a given location is read-only.bool Whether this location is read-only 1.31
Definition
ExternalStoreHttp.php:35
MediaWiki\ExternalStore\ExternalStoreHttp\store
store( $location, $data)
Insert a data item into a given location.string|bool The URL of the stored data item,...
Definition
ExternalStoreHttp.php:29
MediaWiki\ExternalStore\ExternalStoreHttp\fetchFromURL
fetchFromURL( $url)
Fetch data from given external store URL.string|bool The text stored or false on error
Definition
ExternalStoreHttp.php:23
MediaWiki\ExternalStore\ExternalStoreMedium
Base class for external storage.
Definition
ExternalStoreMedium.php:25
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:265
MediaWiki\MediaWikiServices\getInstance
static getInstance()
Returns the global default instance of the top level service locator.
Definition
MediaWikiServices.php:353
MediaWiki\ExternalStore
Definition
ExternalStore.php:7
$url
$url
Definition
opensearch_desc.php:23
includes
ExternalStore
ExternalStoreHttp.php
Generated on Sun May 17 2026 13:24:57 for MediaWiki by
1.10.0