*/
/** A general output object. Need to be overriden */
-class statsOutput {
+class StatsOutput {
function formatPercent( $subset, $total, $revert = false, $accuracy = 2 ) {
wfSuppressWarnings();
$return = sprintf( '%.' . $accuracy . 'f%%', 100 * $subset / $total );
wfRestoreWarnings();
+
return $return;
}
}
/** Outputs WikiText */
-class wikiStatsOutput extends statsOutput {
+class WikiStatsOutput extends StatsOutput {
function heading() {
global $wgDummyLanguageCodes;
$version = SpecialVersion::getVersion( 'nodb' );
}
/** Output text. To be used on a terminal for example. */
-class textStatsOutput extends statsOutput {
+class TextStatsOutput extends StatsOutput {
function element( $in, $heading = false ) {
echo $in . "\t";
}
}
/** csv output. Some people love excel */
-class csvStatsOutput extends statsOutput {
+class CsvStatsOutput extends StatsOutput {
function element( $in, $heading = false ) {
echo $in . ";";
}