MediaWiki REL1_34
MWTerm.php
Go to the documentation of this file.
1<?php
40 function __construct() {
41 }
42
49 public function color( $color ) {
51
52 $light = $wgCommandLineDarkBg ? "1;" : "0;";
53
54 return "\x1b[{$light}{$color}m";
55 }
56
62 public function reset() {
63 return $this->color( 0 );
64 }
65}
66
73 public function color( $color ) {
74 return '';
75 }
76
77 public function reset() {
78 return '';
79 }
80}
$wgCommandLineDarkBg
For colorized maintenance script output, is your terminal background dark ?
Terminal that supports ANSI escape sequences.
Definition MWTerm.php:39
reset()
Return ANSI terminal escape code for restoring default text attributes.
Definition MWTerm.php:62
color( $color)
Return ANSI terminal escape code for changing text attribs/color.
Definition MWTerm.php:49
A colour-less terminal.
Definition MWTerm.php:72
color( $color)
Definition MWTerm.php:73