\Inhere\Console\Component\InteractChoose

Class Choose

Summary

Methods
Properties
Constants
one()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

one()

one(string  $description, string|array  $options, string|integer  $default = null, boolean  $allowExit = true) : string

Choose one of several options

Parameters

string $description
string|array $options

Option data e.g [ // option => value '1' => 'chengdu', '2' => 'beijing' ]

string|integer $default

Default option

boolean $allowExit

Returns

string