| Fully Qualified Name: | Laminas\Console\Prompt\Line |
| Extends: | AbstractPrompt |
| Name | Description | Defined By |
|---|---|---|
| __construct() | Ask the user for an answer (a line of text) | Line |
| getAllowEmpty() | Line | |
| getConsole() | Return console adapter to use when showing prompt. | AbstractPrompt |
| getLastResponse() | Return last answer to this prompt. | AbstractPrompt |
| getMaxLength() | Line | |
| getPromptText() | Line | |
| prompt() | Create an instance of this prompt, show it and return response. | AbstractPrompt |
| setAllowEmpty() | Line | |
| setConsole() | Set console adapter to use when showing prompt. | AbstractPrompt |
| setMaxLength() | Line | |
| setPromptText() | Line | |
| show() | Show the prompt to user and return the answer. | Line |
Ask the user for an answer (a line of text)
| Parameter Name | Type | Description |
|---|---|---|
| $promptText | string | The |
| $allowEmpty | bool | Is |
| $maxLength | int | Maximum |
Returns:
Returns: bool
Return console adapter to use when showing prompt.
Returns: \ConsoleAdapter
Return last answer to this prompt.
Returns: mixed
Returns: int
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:
Set console adapter to use when showing prompt.
| Parameter Name | Type | Description |
|---|---|---|
| $adapter | \ConsoleAdapter |
Returns:
| Parameter Name | Type | Description |
|---|---|---|
| $maxLength | int |
Returns:
| Parameter Name | Type | Description |
|---|---|---|
| $promptText | string |
Returns:
Show the prompt to user and return the answer.
Returns: string