class BooleanPrompter extends TextPrompter (View source)

Class BooleanPrompter

Methods

__construct(string $question = null, $default = null, IOInterface $io = null)

Constructor.

string
ask(string $msg = '', string $default = null)

Show prompt to ask user.

string
in(string $question = null)

Get a value from standard input.

string
__invoke(string $msg = null, string $default = null)

Proxy to ask method.

getIO()

Method to get property Io

setIO(IOInterface $io)

Method to set property io

array
getTrueAlias()

Get true value alias.

setTrueAlias(array $trueAlias)

Set true value alias.

array
getFalseAlias()

Get aliases of false value.

setFalseAlias(array $falseAlias)

Set aliases of false value.

Details

__construct(string $question = null, $default = null, IOInterface $io = null)

Constructor.

Parameters

string $question The question you want to ask.
$default $default The default value.
IOInterface $io The input object.

at line line 55
string ask(string $msg = '', string $default = null)

Show prompt to ask user.

Parameters

string $msg Question.
string $default Default value.

Return Value

string The value that use input.

string in(string $question = null)

Get a value from standard input.

Parameters

string $question The question you want to ask user.

Return Value

string The input string from standard input.

string __invoke(string $msg = null, string $default = null)

Proxy to ask method.

Parameters

string $msg Question.
string $default Default value.

Return Value

string The value that use input.

IOInterface getIO()

Method to get property Io

Return Value

IOInterface

AbstractPrompter setIO(IOInterface $io)

Method to set property io

Parameters

IOInterface $io

Return Value

AbstractPrompter Return self to support chaining.

at line line 85
array getTrueAlias()

Get true value alias.

Return Value

array Aliases.

at line line 99
BooleanPrompter setTrueAlias(array $trueAlias)

Set true value alias.

Parameters

array $trueAlias Alias you want to set.

Return Value

BooleanPrompter Return self to support chaining.

at line line 113
array getFalseAlias()

Get aliases of false value.

Return Value

array Aliases.

at line line 127
BooleanPrompter setFalseAlias(array $falseAlias)

Set aliases of false value.

Parameters

array $falseAlias Alias you want to set.

Return Value

BooleanPrompter Return self to support chaining.