Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -359,7 +359,7 @@ |
360 | 360 | |
361 | 361 | /** |
362 | 362 | * Get the Query database connection (read-only) |
363 | | - * @return Database |
| 363 | + * @return DatabaseBase |
364 | 364 | */ |
365 | 365 | protected function getDB() { |
366 | 366 | if ( is_null( $this->mDb ) ) { |
Index: trunk/phase3/includes/api/ApiQueryBlocks.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | | - * Query module to enumerate all available pages. |
| 34 | + * Query module to enumerate all user blocks |
35 | 35 | * |
36 | 36 | * @ingroup API |
37 | 37 | */ |
Index: trunk/phase3/includes/WebResponse.php |
— | — | @@ -56,11 +56,19 @@ |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | | - |
| 60 | +/** |
| 61 | + * @ingroup HTTP |
| 62 | + */ |
61 | 63 | class FauxResponse extends WebResponse { |
62 | 64 | private $headers; |
63 | 65 | private $cookies; |
64 | 66 | |
| 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 | + */ |
65 | 73 | public function header( $string, $replace = true, $http_response_code = null ) { |
66 | 74 | list( $key, $val ) = explode( ":", $string, 2 ); |
67 | 75 | |
— | — | @@ -69,17 +77,31 @@ |
70 | 78 | } |
71 | 79 | } |
72 | 80 | |
| 81 | + /** |
| 82 | + * @param $key string |
| 83 | + * @return string |
| 84 | + */ |
73 | 85 | public function getheader( $key ) { |
74 | 86 | return $this->headers[$key]; |
75 | 87 | } |
76 | 88 | |
| 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 | + */ |
77 | 94 | public function setcookie( $name, $value, $expire = 0 ) { |
78 | 95 | $this->cookies[$name] = $value; |
79 | 96 | } |
80 | 97 | |
| 98 | + /** |
| 99 | + * @param $name string |
| 100 | + * @return string |
| 101 | + */ |
81 | 102 | public function getcookie( $name ) { |
82 | 103 | if ( isset( $this->cookies[$name] ) ) { |
83 | 104 | return $this->cookies[$name]; |
84 | 105 | } |
| 106 | + return null; |
85 | 107 | } |
86 | 108 | } |