1480. Class

1480.1. Zend\Console\Prompt\Select

1480.1.1. Methods

1480.1.1.1. __construct

__construct()

Ask the user to select one of pre-defined options

Parameters:
  • string – The prompt text to display in console
  • array – Allowed options
  • bool – Allow empty (no) selection?
  • bool – True to display selected option?
Throws ExceptionBadMethodCallException:
 

if no options available

1480.1.1.2. show

show()

Show a list of options and prompt the user to select one of them.

Return type:string Selected option

1480.1.1.3. setOptions

setOptions()

Set allowed options

Parameters:array|Traversable
Throws ExceptionBadMethodCallException:
 

1480.1.1.4. getOptions

getOptions()

@return array

Project Versions

Table Of Contents

Previous topic

1476. Function

Next topic

1481. Class

This Page