A few return type hints
authorSam Reed <reedy@users.mediawiki.org>
Sun, 30 Jan 2011 08:16:13 +0000 (08:16 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 30 Jan 2011 08:16:13 +0000 (08:16 +0000)
includes/api/ApiMain.php

index e71c5e1..72b18eb 100644 (file)
@@ -180,6 +180,7 @@ class ApiMain extends ApiBase {
 
        /**
         * Return true if the API was started by other PHP code using FauxRequest
+        * @return bool
         */
        public function isInternalMode() {
                return $this->mInternalMode;
@@ -204,6 +205,8 @@ class ApiMain extends ApiBase {
 
        /**
         * Get the API module object. Only works after executeAction()
+        *
+        * @return ApiBase
         */
        public function getModule() {
                return $this->mModule;
@@ -309,6 +312,8 @@ class ApiMain extends ApiBase {
 
        /**
         * Create an instance of an output formatter by its name
+        *
+        * @return ApiFormatBase
         */
        public function createPrinterByName( $format ) {
                if ( !isset( $this->mFormats[$format] ) ) {
@@ -455,6 +460,7 @@ class ApiMain extends ApiBase {
         * Replace the result data with the information about an exception.
         * Returns the error code
         * @param $e Exception
+        * @return string
         */
        protected function substituteResultWithError( $e ) {
                // Printer may not be initialized if the extractRequestParams() fails for the main module
@@ -516,6 +522,7 @@ class ApiMain extends ApiBase {
 
        /**
         * Set up for the execution.
+        * @return array
         */
        protected function setupExecuteAction() {
                // First add the id to the top element
@@ -692,6 +699,9 @@ class ApiMain extends ApiBase {
                $printer->profileOut();
        }
 
+       /**
+        * @return bool
+        */
        public function isReadMode() {
                return false;
        }
@@ -977,6 +987,7 @@ class ApiMain extends ApiBase {
 
        /**
         * Get the array mapping module names to class names
+        * @return array
         */
        function getModules() {
                return $this->mModules;