Commit d506e5c5 authored by Jon Pugh's avatar Jon Pugh

Add Property::forceAsk() to allow a property to always ask the user even if it has a default value.

parent 08c3a856
......@@ -38,6 +38,14 @@ class Property {
public $default = NULL;
public $required = FALSE;
public $validate;
/**
* @var bool
*
* Force asking for this property. We don't want "root" property
* automatically setting itself to the default (current directory).
*/
public $forceAsk = FALSE;
/**
* Allow "backwards" compatibility: return the description when converting to a string.
......@@ -122,4 +130,16 @@ class Property {
$this->validate = $callable;
return $this;
}
/**
* Set this property to always ask the user, even though it provides a default.
*
* @param bool $force
*
* @return $this
*/
public function forceAsk($force = TRUE) {
$this->forceAsk = $force;
return $this;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment