input/YesNoInputRequest.php
Encapsulates an input request that returns a boolean (yes/no).
- Author
- Hans Lellelid
- Package
- phing.input
- Version
- $Id: 659526fec1ed2e66d5b9308fba48924ea3dda494 $
\YesNoInputRequest
Package: phing\input
Encapsulates an input request that returns a boolean (yes/no).
- Parent(s)
- \MultipleChoiceInputRequest < \InputRequest
- Author
- Hans Lellelid
- Version
- $Id: 659526fec1ed2e66d5b9308fba48924ea3dda494 $
Properties


$choices= 'array()'
inheritedInherited from:
\MultipleChoiceInputRequest::$$choices
Default value
array()
Details- Type
- n/a
- Inherited_from
- \MultipleChoiceInputRequest::$$choices


$defaultValue= ''
Details
- Type
- n/a
- Inherited_from
- \InputRequest::$$defaultValue
- Inherited_from
- \MultipleChoiceInputRequest::$$defaultValue


$input= ''
Details
- Type
- n/a
- Inherited_from
- \InputRequest::$$input
- Inherited_from
- \MultipleChoiceInputRequest::$$input


$prompt= ''
Details
- Type
- n/a
- Inherited_from
- \InputRequest::$$prompt
- Inherited_from
- \MultipleChoiceInputRequest::$$prompt


$promptChar= ''
Details
- Type
- n/a
- Inherited_from
- \InputRequest::$$promptChar
- Inherited_from
- \MultipleChoiceInputRequest::$$promptChar
Methods


__construct(
string $prompt, array $choices
)
:
void
inherited
Inherited from:
\MultipleChoiceInputRequest::__construct()
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
inherited
Inherited from:
\MultipleChoiceInputRequest::getChoices()
Returns
Type | Description |
---|---|
\The | possible values. |


getDefaultValue(
)
:
mixed
inherited
Return the default value to use.
Inherited from: \InputRequest::getDefaultValue()\MultipleChoiceInputRequest::getDefaultValue()
Returns
Type | Description |
---|---|
mixed |


getPrompt(
)
:
void
inherited
Retrieves the prompt text.
Inherited from: \InputRequest::getPrompt()\MultipleChoiceInputRequest::getPrompt()

getPromptChar(
)
:
string
inherited
Return the default value to use.
Inherited from: \InputRequest::getPromptChar()\MultipleChoiceInputRequest::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()\MultipleChoiceInputRequest::setDefaultValue()
Parameters
Name | Type | Description |
---|---|---|
$v | mixed |


setInput(
$input
)
:
void
inherited
Sets the user provided input.
Inherited from: \InputRequest::setInput()\MultipleChoiceInputRequest::setInput()
Parameters
Name | Type | Description |
---|---|---|
$input |


setPromptChar(
string $c
)
:
void
inherited
Set the default value to use.
Inherited from: \InputRequest::setPromptChar()\MultipleChoiceInputRequest::setPromptChar()
Parameters
Name | Type | Description |
---|---|---|
$c | string |