MediaWiki  master
ExternalStoreHttp.php
Go to the documentation of this file.
1 <?php
22 
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 }
External storage using HTTP requests.
store( $location, $data)
Insert a data item into a given location.
isReadOnly( $location)
Check if a given location is read-only.
fetchFromURL( $url)
Fetch data from given external store URL.
Base class for external storage.
MediaWiki exception.
Definition: MWException.php:32
Service locator for MediaWiki core services.