You are here

public function Question::setHidden in Zircon Profile 8

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

Sets whether the user response must be hidden or not.

Parameters

bool $hidden:

Return value

Question The current instance

Throws

\LogicException In case the autocompleter is also used

File

vendor/symfony/console/Question/Question.php, line 81

Class

Question
Represents a Question.

Namespace

Symfony\Component\Console\Question

Code

public function setHidden($hidden) {
  if ($this->autocompleterValues) {
    throw new \LogicException('A hidden question cannot use the autocompleter.');
  }
  $this->hidden = (bool) $hidden;
  return $this;
}