getFormatedText() 공개 메소드

public getFormatedText ( )
예제 #1
0
 protected function askQuestion(InteractiveQuestion $question)
 {
     $dialog = $this->getHelperSet()->get('dialog');
     return $dialog->askAndValidate($this->getOutput(), $question->getFormatedText(), $question->getValidator(), false, $question->getDefault());
 }
예제 #2
0
파일: Output.php 프로젝트: liip/rmt
 public function askQuestion(InteractiveQuestion $question, $position = null, InputInterface $input = null)
 {
     $text = ($position !== null ? $position . ') ' : null) . $question->getFormatedText();
     if ($this->dialogHelper instanceof QuestionHelper) {
         if (!$input) {
             throw new \InvalidArgumentException('With symfony 3, the input stream may not be null');
         }
         $q = new Question($text, $question->getDefault());
         $q->setValidator($question->getValidator());
         if ($question->isHiddenAnswer()) {
             $q->setHidden(true);
         }
         return $this->dialogHelper->ask($input, $this, $q);
     }
     if ($this->dialogHelper instanceof DialogHelper) {
         if ($question->isHiddenAnswer()) {
             return $this->dialogHelper->askHiddenResponseAndValidate($this, $text, $question->getValidator(), false);
         }
         return $this->dialogHelper->askAndValidate($this, $text, $question->getValidator(), false, $question->getDefault());
     }
     throw new \RuntimeException("Invalid dialogHelper");
 }