Encapsulates an input request.

author | Stefan Bodewig
version | $Id$
package | phing.input

### Methods

## __construct()

    __construct(string $prompt, array $choices)

### 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

### Returns

`\The`possible values.

## Return the default value to use.

    getDefaultValue() : mixed

Inherited

inherited_from | \InputRequest::getDefaultValue()

### Returns

`mixed`

## Retrieves the user input.

    getInput()

Inherited

inherited_from | \InputRequest::getInput()

## Retrieves the prompt text.

    getPrompt()

Inherited

inherited_from | \InputRequest::getPrompt()

## Return the default value to use.

    getPromptChar() : string

Inherited

inherited_from | \InputRequest::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()

### Parameters

#### $v

`mixed`

## Sets the user provided input.

    setInput($input)

Inherited

inherited_from | \InputRequest::setInput()

### Parameters

#### $input

## Set the default value to use.

    setPromptChar(string $c)

Inherited

inherited_from | \InputRequest::setPromptChar()

### Parameters

#### $c

`string`

### Properties

##

    $choices

##

    $defaultValue

Inherited

inherited_from | \InputRequest::$$defaultValue

##

    $input

Inherited

inherited_from | \InputRequest::$$input

##

    $prompt

Inherited

inherited_from | \InputRequest::$$prompt

##

    $promptChar

Inherited

inherited_from | \InputRequest::$$promptChar