<?php
+
/*
* Class for handling database updates. Roughly based off of updaters.inc, with
* a few improvements :)
*/
-
class Update {
- // Array of updates to perform on the database
+ /**
+ * Array of updates to perform on the database
+ *
+ * @var array
+ */
protected $updates = array();
- // Things we'll need
- protected $db, $updater;
+ protected $db;
+
+ protected $updater;
public function __construct( $db ) {
$this->db = $db;
);
}
}
-}
+
+}
\ No newline at end of file
<?php
+
/**
* All DBs supported by MediaWiki need to implement this. Base interface for
* Updaters, which is replacing updaters.inc
*/
interface Updaters {
+
/**
* Get an array of updates to perform on the database. Should return a
* mutli-dimensional array. The main key is the MediaWiki version (1.12,
* @return Array
*/
public function getUpdates();
+
}
/**
- * Mysql implementation
+ * Mysql implementation.
*/
class MysqlUpdater implements Updaters {
),
);
}
+
}
/**
- * Sqlite
+ * Sqlite implementation.
*/
class SqliteUpdater implements Updaters {
+
public function getUpdates() {
return array(
'1.14' => array(
),
);
}
+
}
/**
- * Oracle
+ * Oracle implementation.
*/
class OracleUpdater implements Updaters {
+
public function getUpdates() {
return array();
}
-}
+
+}
\ No newline at end of file