Zend Framework
3.0
|
Public Member Functions | |
__construct ($promptText= 'Please hit a key', $allowedChars= '0123456789abcdefghijklmnopqrstuvwxyz', $ignoreCase=true, $allowEmpty=false, $echo=true) | |
Ask the user for a single key stroke. | |
show () | |
Show the prompt to user and return a single char. | |
setAllowEmpty ($allowEmpty) | |
getAllowEmpty () | |
setPromptText ($promptText) | |
getPromptText () | |
setAllowedChars ($allowedChars) | |
getAllowedChars () | |
setIgnoreCase ($ignoreCase) | |
getIgnoreCase () | |
setEcho ($echo) | |
getEcho () | |
Public Member Functions inherited from AbstractPrompt | |
getLastResponse () | |
Return last answer to this prompt. | |
getConsole () | |
Return console adapter to use when showing prompt. | |
setConsole (ConsoleAdapter $adapter) | |
Set console adapter to use when showing prompt. | |
Protected Attributes | |
$promptText | |
$allowEmpty | |
$allowedChars | |
$ignoreCase | |
$echo | |
Protected Attributes inherited from AbstractPrompt | |
$console | |
$lastResponse | |
Additional Inherited Members | |
Static Public Member Functions inherited from AbstractPrompt | |
static | prompt () |
Create an instance of this prompt, show it and return response. | |
__construct | ( | $promptText = 'Please hit a key' , |
|
$allowedChars = '0123456789abcdefghijklmnopqrstuvwxyz' , |
|||
$ignoreCase = true , |
|||
$allowEmpty = false , |
|||
$echo = true |
|||
) |
Ask the user for a single key stroke.
string | $promptText | The prompt text to display in console |
string | $allowedChars | A list of allowed chars (i.e. "abc12345") |
bool | $ignoreCase | If true, case will be ignored and prompt will always return lower-cased response |
bool | $allowEmpty | Is empty response allowed? |
bool | $echo | Display the selection after user presses key |
getAllowedChars | ( | ) |
getAllowEmpty | ( | ) |
getEcho | ( | ) |
getIgnoreCase | ( | ) |
getPromptText | ( | ) |
setAllowedChars | ( | $allowedChars | ) |
string | $allowedChars |
setAllowEmpty | ( | $allowEmpty | ) |
bool | $allowEmpty |
setEcho | ( | $echo | ) |
bool | $echo |
setIgnoreCase | ( | $ignoreCase | ) |
bool | $ignoreCase |
setPromptText | ( | $promptText | ) |
string | $promptText |
show | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |