# input/MultipleChoiceInputRequest.php

Encapsulates an input request.

Author
  Stefan Bodewig
Package
  phing.input
Version
  $Revision: 526 $

## \MultipleChoiceInputRequest
jump to top

Package: phing\input

Encapsulates an input request.

Parent(s)
  \InputRequest
Children
  \YesNoInputRequest
Author
  Stefan Bodewig
Version
  $Revision: 526 $

### Properties

`$choices= 'array()'`
Default value `array()`Details

Type

`$defaultValue= ''`
inherited Inherited from: \InputRequest::$defaultValue
Details

Type
Inherited_from
  \InputRequest::$defaultValue

`$input= ''`
inherited Inherited from: \InputRequest::$input
Details

Type
Inherited_from
  \InputRequest::$input

`$prompt= ''`
inherited Inherited from: \InputRequest::$prompt
Details

Type
Inherited_from
  \InputRequest::$prompt

`$promptChar= ''`
inherited Inherited from: \InputRequest::$promptChar
Details

Type
Inherited_from
  \InputRequest::$promptChar

### Methods

`__construct( string $prompt, array $choices ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$prompt | string | The prompt to show to the user. Must not be null.
$choices | array | holds all input values that are allowed. Must not be null.

`getChoices( ) : \The`

Returns

Type | Description
--- | ---
\The | possible values.

`getDefaultValue( ) : mixed`
inherited

Return the default value to use.

Inherited from: \InputRequest::getDefaultValue()
Returns

Type | Description
--- | ---
mixed |

`getInput( ) : void`
inherited

Retrieves the user input.

Inherited from: \InputRequest::getInput()
`getPrompt( ) : void`
inherited

Retrieves the prompt text.

Inherited from: \InputRequest::getPrompt()
`getPromptChar( ) : string`
inherited

Return the default value to use.

Inherited from: \InputRequest::getPromptChar()
Returns

Type | Description
--- | ---
string |

`isInputValid( ) : true`

Is the user input valid?

Returns

Type | Description
--- | ---
true | if the input is one of the allowed values.

`setDefaultValue( mixed $v ) : void`
inherited

Set the default value to use.

Inherited from: \InputRequest::setDefaultValue()
Parameters

Name | Type | Description
--- | --- | ---
$v | mixed |

`setInput( $input ) : void`
inherited

Sets the user provided input.

Inherited from: \InputRequest::setInput()
Parameters

Name | Type | Description
--- | --- | ---
$input |  |

`setPromptChar( string $c ) : void`
inherited

Set the default value to use.

Inherited from: \InputRequest::setPromptChar()
Parameters

Name | Type | Description
--- | --- | ---
$c | string |

Documentation was generated by DocBlox 0.15.1.