Fully Qualified Name: | Laminas\Console\Prompt\Confirm |
Extends: | Char |
Name | Description | Defined By |
---|---|---|
__construct() | Ask the user for a single key stroke | Confirm |
getAllowEmpty() | Char | |
getAllowedChars() | Char | |
getConsole() | Return console adapter to use when showing prompt. | AbstractPrompt |
getEcho() | Char | |
getIgnoreCase() | Char | |
getLastResponse() | Return last answer to this prompt. | AbstractPrompt |
getNoChar() | Confirm | |
getPromptText() | Char | |
getYesChar() | Confirm | |
prompt() | Create an instance of this prompt, show it and return response. | AbstractPrompt |
setAllowEmpty() | Char | |
setAllowedChars() | Char | |
setConsole() | Set console adapter to use when showing prompt. | AbstractPrompt |
setEcho() | Char | |
setIgnoreCase() | Char | |
setNoChar() | Confirm | |
setPromptText() | Char | |
setYesChar() | Confirm | |
show() | Show the confirmation message and return result. | Confirm |
Ask the user for a single key stroke
Parameter Name | Type | Description |
---|---|---|
$promptText | string | The |
$yesChar | string | The |
$noChar | string | The |
Returns:
Returns: bool
Returns: string
Return console adapter to use when showing prompt.
Returns: \ConsoleAdapter
Returns: bool
Returns: bool
Return last answer to this prompt.
Returns: mixed
Returns: string
Returns: string
Returns: string
Create an instance of this prompt, show it and return response.
This is a convenience method for creating statically creating prompts, i.e.:
$name = Laminas\Console\Prompt\Line::prompt("Enter your name: ");
Returns: mixed
Parameter Name | Type | Description |
---|---|---|
$allowEmpty | bool |
Returns:
Parameter Name | Type | Description |
---|---|---|
$allowedChars | string |
Returns:
Set console adapter to use when showing prompt.
Parameter Name | Type | Description |
---|---|---|
$adapter | \ConsoleAdapter |
Returns:
Parameter Name | Type | Description |
---|---|---|
$echo | bool |
Returns:
Parameter Name | Type | Description |
---|---|---|
$ignoreCase | bool |
Returns:
Parameter Name | Type | Description |
---|---|---|
$noChar | string |
Returns:
Parameter Name | Type | Description |
---|---|---|
$promptText | string |
Returns:
Parameter Name | Type | Description |
---|---|---|
$yesChar | string |
Returns:
Show the confirmation message and return result.
Returns: bool