setPromptText($promptText); } if ($yesChar !== null) { $this->setYesChar($yesChar); } if ($noChar !== null) { $this->setNoChar($noChar); } } /** * Show the confirmation message and return result. * * @return bool */ public function show() { $char = parent::show(); if ($this->ignoreCase) { $response = strtolower($char) === strtolower($this->yesChar); } else { $response = $char === $this->yesChar; } return $this->lastResponse = $response; } /** * @param string $noChar */ public function setNoChar($noChar) { $this->noChar = $noChar; $this->setAllowedChars($this->yesChar . $this->noChar); } /** * @return string */ public function getNoChar() { return $this->noChar; } /** * @param string $yesChar */ public function setYesChar($yesChar) { $this->yesChar = $yesChar; $this->setAllowedChars($this->yesChar . $this->noChar); } /** * @return string */ public function getYesChar() { return $this->yesChar; } }