- if( isset( $_SERVER['argv'] ) && in_array( '--color', $_SERVER['argv'] ) ) {
- $this->color = true;
- } elseif( isset( $_SERVER['argv'] ) && in_array( '--color=yes', $_SERVER['argv'] ) ) {
- $this->color = true;
- } elseif( isset( $_SERVER['argv'] ) && in_array( '--color=light', $_SERVER['argv'] ) ) {
- $this->color = true;
- $this->lightcolor = true;
- } elseif( isset( $_SERVER['argv'] ) && in_array( '--color=no', $_SERVER['argv'] ) ) {
- $this->color = false;
- } elseif( wfIsWindows() ) {
- $this->color = false;
- } else {
- # Only colorize output if stdout is a terminal.
- $this->color = posix_isatty(1);
- }