public function __construct(array $def)
{
foreach ($def as $key => $value) {
switch ($key) {
case 'type':
$this->type = $value;
break;
case 'name':
$this->name = $value;
break;
case 'defaultValue':
$this->defaultValue = $value;
$this->defaultValueExists = true;
break;
case 'description':
$this->description = $value;
break;
}
}
$this->config = $def;
}