From d3cd73cc256d856fa4a2ec5ed89d1deca413c915 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 5 Jun 2011 21:04:48 +0000 Subject: [PATCH] Documentation updates and additions --- includes/WebResponse.php | 24 +++++++++++++++++++++++- includes/api/ApiQueryBase.php | 2 +- includes/api/ApiQueryBlocks.php | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/includes/WebResponse.php b/includes/WebResponse.php index 1dded190eb..9baaf3ba86 100644 --- a/includes/WebResponse.php +++ b/includes/WebResponse.php @@ -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; } } diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 74e8ae60e1..90e10dfa8a 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -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 ) ) { diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 3eed9567ee..878a9ed495 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -30,7 +30,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { } /** - * Query module to enumerate all available pages. + * Query module to enumerate all user blocks * * @ingroup API */ -- 2.20.1