Methods
Ask the user to select any number of pre-defined options
__construct(string $promptText, array | \Zend\Console\Prompt\Transversable $options, $ignoreCase, bool $echo) 
Parameters
$promptText
stringThe prompt text to display in console
 
$options
array\Zend\Console\Prompt\TransversableAllowed options
 
$ignoreCase
$echo
boolTrue to display selected option?
 
  
 
Return last answer to this prompt.
getLastResponse() : mixed
Inherited
| inherited_from | 
\Zend\Console\Prompt\AbstractPrompt::getLastResponse() | 
Returns
mixed
  
 
Create an instance of this prompt, show it and return response.
prompt() : mixed
Inherited
This is a convenience method for creating statically creating prompts, i.e.:
 $name = Zend\Console\Prompt\Line::prompt("Enter your name: ");
| inherited_from | 
\Zend\Console\Prompt\AbstractPrompt::prompt() | 
Exceptions
Returns
mixed
  
 
Set console adapter to use when showing prompt.
setConsole(\Zend\Console\Adapter\AdapterInterface $adapter) : void
Inherited
| inherited_from | 
\Zend\Console\Prompt\AbstractPrompt::setConsole() | 
Parameters
  
 
Show a list of options and prompt the user to select any number of them.
show() : array
Returns
arrayChecked options
  
 
Check or uncheck an option
checkOrUncheckOption(string $response) 
Parameters
$response
string
  
 
Generates a mask to to be used by the readChar method.
prepareMask() : string
 
Reads a char from console.
readOption(string $mask) : string
Parameters
$mask
string
Returns
string
  
 
Set allowed options
setOptions(array | \Traversable $options) 
Parameters
$options
array\Traversable
Exceptions
  
 
Shows the available options with checked and unchecked states
showAvailableOptions() 
 
Shows the selected option to the screen
showResponse(string $response) 
Parameters
$response
string
  
 
 Properties
 
 
$lastResponse
$lastResponse : mixed
Inherited
| inherited_from | 
\Zend\Console\Prompt\AbstractPrompt::$$lastResponse | 
  
 
 
Checked options
$checkedOptions : array
 
 
If the response should be echoed to the console or not
$echo : bool
 
 
$ignoreCase
$ignoreCase : bool
 
 
$options
$options : array | \Zend\Console\Prompt\Transversable
 
 
$promptText
$promptText : string