final class Choice implements Question

Methods

__construct(string|array $instructions, array $options)

Create a new single-choice question whose answer is one of the given options.

array
toArray()

Get the question as a provider-neutral array.

Details

at line 20
__construct(string|array $instructions, array $options)

Create a new single-choice question whose answer is one of the given options.

Parameters

string|array $instructions
array $options

option names mapped to an optional description

Exceptions

InvalidArgumentException

at line 32
array toArray()

Get the question as a provider-neutral array.

Return Value

array