Encapsulates an input request that returns a boolean (yes/no).

author | Hans Lellelid
version | $Id: 659526fec1ed2e66d5b9308fba48924ea3dda494 $
package | phing.input

### Methods

## __construct()

    __construct(string $prompt, array $choices)

Inherited

inherited_from | \MultipleChoiceInputRequest::__construct()

### Parameters

#### $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()

    getChoices() : \The

Inherited

inherited_from | \MultipleChoiceInputRequest::getChoices()

### Returns

`\The`possible values.

## Return the default value to use.

    getDefaultValue() : mixed

Inherited

inherited_from | \InputRequest::getDefaultValue()
inherited_from | \MultipleChoiceInputRequest::getDefaultValue()

### Returns

`mixed`

## Converts input to boolean.

    getInput() : boolean

### Returns

`boolean`

## Retrieves the prompt text.

    getPrompt()

Inherited

inherited_from | \InputRequest::getPrompt()
inherited_from | \MultipleChoiceInputRequest::getPrompt()

## Return the default value to use.

    getPromptChar() : string

Inherited

inherited_from | \InputRequest::getPromptChar()
inherited_from | \MultipleChoiceInputRequest::getPromptChar()

### Returns

`string`

## Is the user input valid?

    isInputValid() : true

### Returns

`true`if the input is one of the allowed values.

## Set the default value to use.

    setDefaultValue(mixed $v)

Inherited

inherited_from | \InputRequest::setDefaultValue()
inherited_from | \MultipleChoiceInputRequest::setDefaultValue()

### Parameters

#### $v

`mixed`

## Sets the user provided input.

    setInput($input)

Inherited

inherited_from | \InputRequest::setInput()
inherited_from | \MultipleChoiceInputRequest::setInput()

### Parameters

#### $input

## Set the default value to use.

    setPromptChar(string $c)

Inherited

inherited_from | \InputRequest::setPromptChar()
inherited_from | \MultipleChoiceInputRequest::setPromptChar()

### Parameters

#### $c

`string`

### Properties

##

    $choices

Inherited

inherited_from | \MultipleChoiceInputRequest::$$choices

##

    $defaultValue

Inherited

inherited_from | \InputRequest::$$defaultValue
inherited_from | \MultipleChoiceInputRequest::$$defaultValue

##

    $input

Inherited

inherited_from | \InputRequest::$$input
inherited_from | \MultipleChoiceInputRequest::$$input

##

    $prompt

Inherited

inherited_from | \InputRequest::$$prompt
inherited_from | \MultipleChoiceInputRequest::$$prompt

##

    $promptChar

Inherited

inherited_from | \InputRequest::$$promptChar
inherited_from | \MultipleChoiceInputRequest::$$promptChar