# classes/phing/tasks/system/PropertyPromptTask.php

## \PropertyPromptTask
jump to top

Deprecated task that uses console to prompt user for property values.

This class is very slightly simpler than the InputTask, but lacks the ability to use a non-console input handler. You should, therefore, use InputTask. This class can serve as a reference, but will be removed in the future.

Extends from
  \Task
author
  Hans Lellelid <hans@xmpl.org> (Phing)
author
  Anthony J. Young-Garner <ajyoung@alum.mit.edu> (Ant)
copyright
  2001,2002 THYRELL. All rights reserved
deprecated
  - in favor of the more capable InputTask
package
  phing.tasks.system
version
  $Revision: 1074 $

### Properties

`string $defaultValue= ''`

The default value to use if no input is entered.

Details

Type
  string

`string $promptCharacter= ''`

The character to put after the text.

Details

Type
  string

`string $promptText= ''`

The text to use for the prompt.

Details

Type
  string

`string $propertyName= ''`

The property name to set with the output.

Details

Type
  string

`string $proposedValue= ''`

The entered value.

Details

Type
  string

`$useExistingValue= ''`

Details

Type

### Methods

`addText( string $prompt ) : void`
Sets the prompt text that will be presented to the user.
Parameters

Name | Type | Description
--- | --- | ---
$prompt | string |

`getDefaultMessage( ) :`
Returns a string to be inserted in the log message indicating whether a default response was specified in the build file.
`getDefaultValue( ) : string`
Returns defaultValue specified in this task for the Property being set.
Returns

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

`getPromptCharacter( ) : string`
Returns the terminating character used to punctuate the prompt text.
Returns

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

`getPromptText( ) : \java.lang.String`
Returns text of the prompt.
Returns

Type | Description
--- | ---
\java.lang.String |

`getPropertyName( ) : string`
Returns name of the Ant Project Property being set by this task.
Returns

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

`init( ) :`
Initializes this task.
`isUseExistingValue( ) : boolean`
Insert the method's description here.

Creation date: (12/10/2001 8:16:16 AM)

Returns

Type | Description
--- | ---
boolean |

`main( ) :`
Run the PropertyPrompt task.
Details

throws

`setDefaultvalue( string $newDefaultvalue ) :`
Sets defaultValue for the Property being set by this task.
Parameters

Name | Type | Description
--- | --- | ---
$newDefaultvalue | string |

`setPromptCharacter( string $newPromptcharacter ) :`
Sets the terminating character used to punctuate the prompt text (default is "?").
Parameters

Name | Type | Description
--- | --- | ---
$newPromptcharacter | string |

`setPromptText( string $newPrompttext ) :`
Sets text of the prompt.
Parameters

Name | Type | Description
--- | --- | ---
$newPrompttext | string |

`setPropertyName( \newPropertyname $newPropertyname ) :`
Specifies the Phing Project Property being set by this task.
Parameters

Name | Type | Description
--- | --- | ---
$newPropertyname | \newPropertyname | java.lang.String

`setUseExistingValue( boolean $newUseExistingValue ) :`
Parameters

Name | Type | Description
--- | --- | ---
$newUseExistingValue | boolean |

Documentation was generated by DocBlox 0.13.1.