Index: trunk/phase3/includes/installer/Update.php |
— | — | @@ -1,16 +1,21 @@ |
2 | 2 | <?php |
| 3 | + |
3 | 4 | /* |
4 | 5 | * Class for handling database updates. Roughly based off of updaters.inc, with |
5 | 6 | * a few improvements :) |
6 | 7 | */ |
7 | | - |
8 | 8 | class Update { |
9 | 9 | |
10 | | - // Array of updates to perform on the database |
| 10 | + /** |
| 11 | + * Array of updates to perform on the database |
| 12 | + * |
| 13 | + * @var array |
| 14 | + */ |
11 | 15 | protected $updates = array(); |
12 | 16 | |
13 | | - // Things we'll need |
14 | | - protected $db, $updater; |
| 17 | + protected $db; |
| 18 | + |
| 19 | + protected $updater; |
15 | 20 | |
16 | 21 | public function __construct( $db ) { |
17 | 22 | $this->db = $db; |
— | — | @@ -144,4 +149,5 @@ |
145 | 150 | ); |
146 | 151 | } |
147 | 152 | } |
148 | | -} |
| 153 | + |
| 154 | +} |
\ No newline at end of file |
Index: trunk/phase3/includes/installer/Updaters.php |
— | — | @@ -1,9 +1,11 @@ |
2 | 2 | <?php |
| 3 | + |
3 | 4 | /** |
4 | 5 | * All DBs supported by MediaWiki need to implement this. Base interface for |
5 | 6 | * Updaters, which is replacing updaters.inc |
6 | 7 | */ |
7 | 8 | interface Updaters { |
| 9 | + |
8 | 10 | /** |
9 | 11 | * Get an array of updates to perform on the database. Should return a |
10 | 12 | * mutli-dimensional array. The main key is the MediaWiki version (1.12, |
— | — | @@ -13,10 +15,11 @@ |
14 | 16 | * @return Array |
15 | 17 | */ |
16 | 18 | public function getUpdates(); |
| 19 | + |
17 | 20 | } |
18 | 21 | |
19 | 22 | /** |
20 | | - * Mysql implementation |
| 23 | + * Mysql implementation. |
21 | 24 | */ |
22 | 25 | class MysqlUpdater implements Updaters { |
23 | 26 | |
— | — | @@ -171,12 +174,14 @@ |
172 | 175 | ), |
173 | 176 | ); |
174 | 177 | } |
| 178 | + |
175 | 179 | } |
176 | 180 | |
177 | 181 | /** |
178 | | - * Sqlite |
| 182 | + * Sqlite implementation. |
179 | 183 | */ |
180 | 184 | class SqliteUpdater implements Updaters { |
| 185 | + |
181 | 186 | public function getUpdates() { |
182 | 187 | return array( |
183 | 188 | '1.14' => array( |
— | — | @@ -211,13 +216,16 @@ |
212 | 217 | ), |
213 | 218 | ); |
214 | 219 | } |
| 220 | + |
215 | 221 | } |
216 | 222 | |
217 | 223 | /** |
218 | | - * Oracle |
| 224 | + * Oracle implementation. |
219 | 225 | */ |
220 | 226 | class OracleUpdater implements Updaters { |
| 227 | + |
221 | 228 | public function getUpdates() { |
222 | 229 | return array(); |
223 | 230 | } |
224 | | -} |
| 231 | + |
| 232 | +} |
\ No newline at end of file |