is_tty() публичный статический Метод

public static is_tty ( )
Пример #1
0
 private function fatal($exception, $message = null, $trace = false)
 {
     fwrite(STDERR, "aborted!\n");
     if (!$message) {
         $message = $exception->getMessage();
     }
     if (!$message) {
         $message = get_class($exception);
     }
     if (Utils::is_tty()) {
         fwrite(STDERR, "{$message}");
     } else {
         fwrite(STDERR, $message);
     }
     fwrite(STDERR, "\n\n");
     if ($trace) {
         fwrite(STDERR, $exception->getTraceAsString() . "\n");
     } else {
         fwrite(STDERR, "(See full trace by running task with --trace)\n");
     }
     die(1);
 }
Пример #2
0
function bold($str)
{
    return \phake\Utils::is_tty() ? "{$str}" : $str;
}