class Select

Select helper.

Properties

protected Input $input Input instance.
protected Output $output Output instance.

Methods

__construct(Input $input, Output $output)

Constructor.

string
buildOptionsList(array $options)

Returns a list of options.

int
ask(string $question, array $options)

Prints out a list of options and returns the array key of the chosen value.

Details

at line 43
__construct(Input $input, Output $output)

Constructor.

Parameters

Input $input Input instance
Output $output Output instance

at line 56
protected string buildOptionsList(array $options)

Returns a list of options.

Parameters

array $options Options

Return Value

string

at line 75
int ask(string $question, array $options)

Prints out a list of options and returns the array key of the chosen value.

Parameters

string $question Question to ask
array $options Numeric array of options to choose from

Return Value

int