MediaWiki  REL1_21
MWTerm.php
Go to the documentation of this file.
00001 <?php
00031 class AnsiTermColorer {
00032         function __construct() {
00033         }
00034 
00041         public function color( $color ) {
00042                 global $wgCommandLineDarkBg;
00043 
00044                 $light = $wgCommandLineDarkBg ? "1;" : "0;";
00045 
00046                 return "\x1b[{$light}{$color}m";
00047         }
00048 
00054         public function reset() {
00055                 return $this->color( 0 );
00056         }
00057 }
00058 
00064 class DummyTermColorer {
00065         public function color( $color ) {
00066                 return '';
00067         }
00068 
00069         public function reset() {
00070                 return '';
00071         }
00072 }