MediaWiki master
ExternalStoreHttp.php
Go to the documentation of this file.
1<?php
8
20 public function fetchFromURL( $url ) {
21 return MediaWikiServices::getInstance()->getHttpRequestFactory()->
22 get( $url, [], __METHOD__ );
23 }
24
26 public function store( $location, $data ) {
27 // @phan-suppress-previous-line PhanPluginNeverReturnMethod
28 throw new LogicException( "ExternalStoreHttp is read-only and does not support store()." );
29 }
30
32 public function isReadOnly( $location ) {
33 return true;
34 }
35}
External storage using HTTP requests.
store( $location, $data)
Insert a data item into a given location.string|bool The URL of the stored data item,...
isReadOnly( $location)
Check if a given location is read-only.bool Whether this location is read-only 1.31
fetchFromURL( $url)
Fetch data from given external store URL.string|bool The text stored or false on error
Base class for external storage.
Service locator for MediaWiki core services.