r89533 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89532‎ | r89533 | r89534 >
Date:21:04, 5 June 2011
Author:reedy
Status:ok
Tags:
Comment:
Documentation updates and additions
Modified paths:
  • /trunk/phase3/includes/WebResponse.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBlocks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBase.php
@@ -359,7 +359,7 @@
360360
361361 /**
362362 * Get the Query database connection (read-only)
363 - * @return Database
 363+ * @return DatabaseBase
364364 */
365365 protected function getDB() {
366366 if ( is_null( $this->mDb ) ) {
Index: trunk/phase3/includes/api/ApiQueryBlocks.php
@@ -30,7 +30,7 @@
3131 }
3232
3333 /**
34 - * Query module to enumerate all available pages.
 34+ * Query module to enumerate all user blocks
3535 *
3636 * @ingroup API
3737 */
Index: trunk/phase3/includes/WebResponse.php
@@ -56,11 +56,19 @@
5757 }
5858 }
5959
60 -
 60+/**
 61+ * @ingroup HTTP
 62+ */
6163 class FauxResponse extends WebResponse {
6264 private $headers;
6365 private $cookies;
6466
 67+ /**
 68+ * Stores a HTTP header
 69+ * @param $string String: header to output
 70+ * @param $replace Bool: replace current similar header
 71+ * @param $http_response_code null|int Forces the HTTP response code to the specified value.
 72+ */
6573 public function header( $string, $replace = true, $http_response_code = null ) {
6674 list( $key, $val ) = explode( ":", $string, 2 );
6775
@@ -69,17 +77,31 @@
7078 }
7179 }
7280
 81+ /**
 82+ * @param $key string
 83+ * @return string
 84+ */
7385 public function getheader( $key ) {
7486 return $this->headers[$key];
7587 }
7688
 89+ /**
 90+ * @param $name String: name of cookie
 91+ * @param $value String: value to give cookie
 92+ * @param $expire Int: number of seconds til cookie expires
 93+ */
7794 public function setcookie( $name, $value, $expire = 0 ) {
7895 $this->cookies[$name] = $value;
7996 }
8097
 98+ /**
 99+ * @param $name string
 100+ * @return string
 101+ */
81102 public function getcookie( $name ) {
82103 if ( isset( $this->cookies[$name] ) ) {
83104 return $this->cookies[$name];
84105 }
 106+ return null;
85107 }
86108 }

Status & tagging log