input/MultipleChoiceInputRequest.php

Show: inherited
Table of Contents

Encapsulates an input request.

Author
Stefan Bodewig  
Package
phing.input  
Version
$Id$  

\MultipleChoiceInputRequest

Package: phing\input

Encapsulates an input request.

Parent(s)
\InputRequest
Children
\YesNoInputRequest
Author
Stefan Bodewig  
Version
$Id$  

Properties

Propertyprotected  $choices= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotected  $defaultValue= ''
inheritedInherited from: \InputRequest::$$defaultValue
Details
Type
n/a
Inherited_from
\InputRequest::$$defaultValue  
Propertyprotected  $input= ''
inheritedInherited from: \InputRequest::$$input
Details
Type
n/a
Inherited_from
\InputRequest::$$input  
Propertyprotected  $prompt= ''
inheritedInherited from: \InputRequest::$$prompt
Details
Type
n/a
Inherited_from
\InputRequest::$$prompt  
Propertyprotected  $promptChar= ''
inheritedInherited from: \InputRequest::$$promptChar
Details
Type
n/a
Inherited_from
\InputRequest::$$promptChar  

Methods

methodpublic__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.

methodpublicgetChoices( ) : \The

Returns
Type Description
\The possible values.
methodpublicgetDefaultValue( ) : mixed
inherited

Return the default value to use.

Inherited from: \InputRequest::getDefaultValue()
Returns
Type Description
mixed
methodpublicgetInput( ) : void
inherited

Retrieves the user input.

Inherited from: \InputRequest::getInput()
methodpublicgetPrompt( ) : void
inherited

Retrieves the prompt text.

Inherited from: \InputRequest::getPrompt()
methodpublicgetPromptChar( ) : string
inherited

Return the default value to use.

Inherited from: \InputRequest::getPromptChar()
Returns
Type Description
string
methodpublicisInputValid( ) : true

Is the user input valid?

Returns
Type Description
true if the input is one of the allowed values.
methodpublicsetDefaultValue( mixed $v ) : void
inherited

Set the default value to use.

Inherited from: \InputRequest::setDefaultValue()
Parameters
Name Type Description
$v mixed
methodpublicsetInput(  $input ) : void
inherited

Sets the user provided input.

Inherited from: \InputRequest::setInput()
Parameters
Name Type Description
$input
methodpublicsetPromptChar( 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.18.1.