public function Console::hasColorSupport in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/sebastian/environment/src/Console.php \SebastianBergmann\Environment\Console::hasColorSupport()
Returns true if STDOUT supports colorization.
This code has been copied and adapted from Symfony\Component\Console\Output\OutputStream.
Return value
bool
File
- vendor/
sebastian/ environment/ src/ Console.php, line 29
Class
Namespace
SebastianBergmann\EnvironmentCode
public function hasColorSupport() {
if (DIRECTORY_SEPARATOR == '\\') {
return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
}
if (!defined('STDOUT')) {
return false;
}
return $this
->isInteractive(STDOUT);
}