Class Number

Summary

Fully Qualified Name: Laminas\Console\Prompt\Number
Extends: Line

Description

Methods

Name Description Defined By
__construct() Ask the user for a number. Number
getAllowEmpty() Number
getAllowFloat() Number
getConsole() Return console adapter to use when showing prompt. AbstractPrompt
getLastResponse() Return last answer to this prompt. AbstractPrompt
getMax() Number
getMaxLength() Number
getMin() Number
getPromptText() Number
prompt() Create an instance of this prompt, show it and return response. AbstractPrompt
setAllowEmpty() Number
setAllowFloat() Number
setConsole() Set console adapter to use when showing prompt. AbstractPrompt
setMax() Number
setMaxLength() Number
setMin() Number
setPromptText() Number
show() Show the prompt to user and return the answer. Number

Method Details

__construct()

Ask the user for a number.

Parameter Name Type Description
$promptText string The
$allowEmpty bool Is
$allowFloat bool Are
$min int Minimum
$max int Maximum

Returns:

getAllowEmpty()

Returns: bool

getAllowFloat()

Returns: bool

getConsole()

Return console adapter to use when showing prompt.

Returns: \ConsoleAdapter

getLastResponse()

Return last answer to this prompt.

Returns: mixed

getMax()

Returns: int

getMaxLength()

Returns: int

getMin()

Returns: int

getPromptText()

Returns: string

prompt()

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

setAllowEmpty()

Parameter Name Type Description
$allowEmpty bool

Returns:

setAllowFloat()

Parameter Name Type Description
$allowFloat bool

Returns:

setConsole()

Set console adapter to use when showing prompt.

Parameter Name Type Description
$adapter \ConsoleAdapter

Returns:

setMax()

Parameter Name Type Description
$max int

Returns:

setMaxLength()

Parameter Name Type Description
$maxLength int

Returns:

setMin()

Parameter Name Type Description
$min int

Returns:

setPromptText()

Parameter Name Type Description
$promptText string

Returns:

show()

Show the prompt to user and return the answer.

Returns: mixed

Top