MediaWiki REL1_32
ExternalStoreMedium.php
Go to the documentation of this file.
1<?php
30abstract class ExternalStoreMedium {
32 protected $params = [];
33
38 public function __construct( array $params = [] ) {
39 $this->params = $params;
40 }
41
49 abstract public function fetchFromURL( $url );
50
57 public function batchFetchFromURLs( array $urls ) {
58 $retval = [];
59 foreach ( $urls as $url ) {
60 $data = $this->fetchFromURL( $url );
61 // Dont return when false to allow for simpler implementations.
62 // errored urls are handled in ExternalStore::batchFetchFromURLs
63 if ( $data !== false ) {
64 $retval[$url] = $data;
65 }
66 }
67
68 return $retval;
69 }
70
79 abstract public function store( $location, $data );
80
88 public function isReadOnly( $location ) {
89 return false;
90 }
91}
Accessable external objects in a particular storage medium.
fetchFromURL( $url)
Fetch data from given external store URL.
store( $location, $data)
Insert a data item into a given location.
__construct(array $params=[])
batchFetchFromURLs(array $urls)
Fetch data from given external store URLs.
isReadOnly( $location)
Check if a given location is read-only.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account incomplete not yet checked for validity & $retval
Definition hooks.txt:266
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))