Documentation updates and additions
authorSam Reed <reedy@users.mediawiki.org>
Sun, 5 Jun 2011 21:04:48 +0000 (21:04 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 5 Jun 2011 21:04:48 +0000 (21:04 +0000)
includes/WebResponse.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryBlocks.php

index 1dded19..9baaf3b 100644 (file)
@@ -56,11 +56,19 @@ class WebResponse {
        }
 }
 
-
+/**
+ * @ingroup HTTP
+ */
 class FauxResponse extends WebResponse {
        private $headers;
        private $cookies;
 
+       /**
+        * Stores a HTTP header
+        * @param $string String: header to output
+        * @param $replace Bool: replace current similar header
+        * @param $http_response_code null|int Forces the HTTP response code to the specified value.
+        */
        public function header( $string, $replace = true, $http_response_code = null ) {
                list( $key, $val ) = explode( ":", $string, 2 );
 
@@ -69,17 +77,31 @@ class FauxResponse extends WebResponse {
                }
        }
 
+       /**
+        * @param $key string
+        * @return string
+        */
        public function getheader( $key ) {
                return $this->headers[$key];
        }
 
+       /**
+        * @param $name String: name of cookie
+        * @param $value String: value to give cookie
+        * @param $expire Int: number of seconds til cookie expires
+        */
        public function setcookie( $name, $value, $expire = 0 ) {
                $this->cookies[$name] = $value;
        }
 
+       /**
+        * @param $name string
+        * @return string
+        */
        public function getcookie( $name )  {
                if ( isset( $this->cookies[$name] ) ) {
                        return $this->cookies[$name];
                }
+               return null;
        }
 }
index 74e8ae6..90e10df 100644 (file)
@@ -359,7 +359,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Get the Query database connection (read-only)
-        * @return Database
+        * @return DatabaseBase
         */
        protected function getDB() {
                if ( is_null( $this->mDb ) ) {
index 3eed956..878a9ed 100644 (file)
@@ -30,7 +30,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 }
 
 /**
- * Query module to enumerate all available pages.
+ * Query module to enumerate all user blocks
  *
  * @ingroup API
  */