6 * Constructor class for data kept in external repositories
8 * External repositories might be populated by maintenance/async
9 * scripts, thus partial moving of data may be possible, as well
10 * as possibility to have any storage format (i.e. for archives)
15 /* Fetch data from given URL */
16 function fetchFromURL($url) {
17 global $wgExternalStores;
19 if (!$wgExternalStores)
22 @list
($proto,$path)=explode('://',$url,2);
26 /* Protocol not enabled */
27 if (!in_array( $proto, $wgExternalStores ))
30 $class='ExternalStore'.ucfirst($proto);
31 /* Preloaded modules might exist, especially ones serving multiple protocols */
32 if (!class_exists($class)) {
33 if (!include_once($class.'.php'))
37 return $store->fetchFromURL($url);
40 /* XXX: may require other methods, for store, delete,
41 * whatever, for initial ext storage