8000 [RFC][Console] Added console style guide helpers by kbond · Pull Request #12035 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[RFC][Console] Added console style guide helpers #12035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 24 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added askHidden helper
  • Loading branch information
kbond committed Oct 2, 2014
commit 887444563fea20420946d9e208662e4d12ec9253
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function table(array $headers, array $rows)
/**
* Asks a question
*
* @param Question|string $question
* @param string $question
* @param string|null $default
* @param callable|null $validator
*
Expand All @@ -176,6 +176,22 @@ public function ask($question, $default = null, $validator = null)
return $this->askQuestion($question, $validator);
}

/**
* Asks a question with the user input hidden
*
* @param string $question
* @param callable|null $validator
*
* @return string
*/
public function askHidden($question, $validator = null)
{
$question = new Question($question);
$question->setHidden(true);

return $this->askQuestion($question, $validator);
}

/**
* Asks for confirmation
*
Expand Down
0