diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /includes/externalstore/ExternalStoreMedium.php | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'includes/externalstore/ExternalStoreMedium.php')
-rw-r--r-- | includes/externalstore/ExternalStoreMedium.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/includes/externalstore/ExternalStoreMedium.php b/includes/externalstore/ExternalStoreMedium.php index 41af7d87..02bdcb51 100644 --- a/includes/externalstore/ExternalStoreMedium.php +++ b/includes/externalstore/ExternalStoreMedium.php @@ -49,6 +49,25 @@ abstract class ExternalStoreMedium { abstract public function fetchFromURL( $url ); /** + * Fetch data from given external store URLs. + * + * @param array $urls A list of external store URLs + * @return array Map from the url to the text stored. Unfound data is not represented + */ + public function batchFetchFromURLs( array $urls ) { + $retval = array(); + foreach ( $urls as $url ) { + $data = $this->fetchFromURL( $url ); + // Dont return when false to allow for simpler implementations. + // errored urls are handled in ExternalStore::batchFetchFromURLs + if ( $data !== false ) { + $retval[$urls] = $data; + } + } + return $retval; + } + + /** * Insert a data item into a given location * * @param string $location the location name |