MediaWiki REL1_33
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}
in the sidebar</td >< td > font color
$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
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37