1472. Class

1472.1. Zend\Console\Prompt\Char

1472.1.1. Methods

1472.1.1.1. __construct

__construct()

Ask the user for a single key stroke

Parameters:
  • string – The prompt text to display in console
  • string – A list of allowed chars (i.e. “abc12345”)
  • bool – If true, case will be ignored and prompt will always return lower-cased response
  • bool – Is empty response allowed?
  • bool – Display the selection after user presses key

1472.1.1.2. show

show()

Show the prompt to user and return a single char.

Return type:string

1472.1.1.3. setAllowEmpty

setAllowEmpty()

@param bool $allowEmpty

1472.1.1.4. getAllowEmpty

getAllowEmpty()

@return bool

1472.1.1.5. setPromptText

setPromptText()

@param string $promptText

1472.1.1.6. getPromptText

getPromptText()

@return string

1472.1.1.7. setAllowedChars

setAllowedChars()

@param string $allowedChars

1472.1.1.8. getAllowedChars

getAllowedChars()

@return string

1472.1.1.9. setIgnoreCase

setIgnoreCase()

@param bool $ignoreCase

1472.1.1.10. getIgnoreCase

getIgnoreCase()

@return bool

1472.1.1.11. setEcho

setEcho()

@param bool $echo

1472.1.1.12. getEcho

getEcho()

@return bool