You are here

private function QuestionHelper::hasSttyAvailable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Helper/QuestionHelper.php \Symfony\Component\Console\Helper\QuestionHelper::hasSttyAvailable()

Returns whether Stty is available or not.

Return value

bool

2 calls to QuestionHelper::hasSttyAvailable()
QuestionHelper::doAsk in vendor/symfony/console/Helper/QuestionHelper.php
Asks the question to the user.
QuestionHelper::getHiddenResponse in vendor/symfony/console/Helper/QuestionHelper.php
Gets a hidden response from user.

File

vendor/symfony/console/Helper/QuestionHelper.php, line 436

Class

QuestionHelper
The QuestionHelper class provides helpers to interact with the user.

Namespace

Symfony\Component\Console\Helper

Code

private function hasSttyAvailable() {
  if (null !== self::$stty) {
    return self::$stty;
  }
  exec('stty 2>&1', $output, $exitcode);
  return self::$stty = $exitcode === 0;
}