]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/ExternalStoreHttp.php
MediaWiki 1.16.0
[autoinstallsdev/mediawiki.git] / includes / ExternalStoreHttp.php
index d7c1cc818d8e1b93d925b190829e050bc2daa78a..092ff7d800efcdcde5388087ee33710649f4ea58 100644 (file)
@@ -1,23 +1,25 @@
 <?php
+
 /**
- * 
- * @package MediaWiki
- *
- * Example class for HTTP accessable external objects
+ * Example class for HTTP accessable external objects.
+ * Only supports reading, not storing.
  *
+ * @ingroup ExternalStorage
  */
 class ExternalStoreHttp {
-       /* Fetch data from given URL */
-       function fetchFromURL($url) {
-        ini_set( "allow_url_fopen", true );
-        $ret = file_get_contents( $url );
-        ini_set( "allow_url_fopen", false );
+
+       /**
+        * 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;
        }
 
-       /* XXX: may require other methods, for store, delete, 
-        * whatever, for initial ext storage  
+       /* XXX: may require other methods, for store, delete,
+        * whatever, for initial ext storage
         */
 }
-?>