Added a function that returns the list of supported formats to ApiMain
authorMax Semenik <maxsem@users.mediawiki.org>
Tue, 3 May 2011 16:54:16 +0000 (16:54 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Tue, 3 May 2011 16:54:16 +0000 (16:54 +0000)
includes/api/ApiMain.php

index 032bad7..31b3e7b 100644 (file)
@@ -989,6 +989,16 @@ class ApiMain extends ApiBase {
        function getModules() {
                return $this->mModules;
        }
+
+       /**
+        * Returns the list of supported formats in form ( 'format' => 'ClassName' )
+        *
+        * @since 1.18
+        * @return array
+        */
+       public function getFormats() {
+               return $this->mFormats;
+       }
 }
 
 /**