MediaWiki  REL1_20
MWTerm.php
Go to the documentation of this file.
00001 <?php
00029 class AnsiTermColorer {
00030         function __construct() {
00031         }
00032 
00039         public function color( $color ) {
00040                 global $wgCommandLineDarkBg;
00041 
00042                 $light = $wgCommandLineDarkBg ? "1;" : "0;";
00043 
00044                 return "\x1b[{$light}{$color}m";
00045         }
00046 
00052         public function reset() {
00053                 return $this->color( 0 );
00054         }
00055 }
00056 
00060 class DummyTermColorer {
00061         public function color( $color ) {
00062                 return '';
00063         }
00064 
00065         public function reset() {
00066                 return '';
00067         }
00068 }
00069