public function addOutputToStdout()
{
$handle = fopen('php://stdout', 'w');
$colour = true;
// special case - check for writing to a pipe
if (!function_exists('posix_isatty') || !posix_isatty($handle)) {
$colour = false;
}
$this->outputHandles['stdout'] = ['handle' => $handle, 'colour' => $colour];
}