X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexternalstore%2FExternalStoreHttp.php;h=879686f724c66ba97a908ec06459a4de3f681f7b;hb=fc3300e36ddffa6418ea987ca5e5e44b40353d5e;hp=311e32b38c53a08edd99a57599d60eeb759e3dc3;hpb=38f29f214baabd3e32f0c4a289a6aaaa7f5ff6c0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/externalstore/ExternalStoreHttp.php b/includes/externalstore/ExternalStoreHttp.php index 311e32b38c..879686f724 100644 --- a/includes/externalstore/ExternalStoreHttp.php +++ b/includes/externalstore/ExternalStoreHttp.php @@ -21,25 +21,21 @@ */ /** - * Example class for HTTP accessable external objects. + * Example class for HTTP accessible external objects. * Only supports reading, not storing. * * @ingroup ExternalStorage */ -class ExternalStoreHttp { +class ExternalStoreHttp extends ExternalStoreMedium { + public function fetchFromURL( $url ) { + return Http::get( $url, [], __METHOD__ ); + } - /** - * Fetch data from given URL - * - * @param $url String: the URL - * @return String: the content at $url - */ - function fetchFromURL( $url ) { - $ret = Http::get( $url ); - return $ret; + public function store( $location, $data ) { + throw new MWException( "ExternalStoreHttp is read-only and does not support store()." ); } - /* XXX: may require other methods, for store, delete, - * whatever, for initial ext storage - */ + public function isReadOnly( $location ) { + return true; + } }