public function addCommandOption($option, $value)
{
if (isset($this->configValidOptions[$option])) {
$validOptions = $this->configValidOptions[$option];
if (is_array($validOptions) && in_array($value, $validOptions)) {
$this->commandOptions[$option] = $value;
return $this;
}
switch ($validOptions) {
case 'string':
if (!empty($value)) {
$this->commandOptions[$option] = $value;
}
break;
case 'bool':
if (is_bool($value)) {
$this->commandOptions[$option] = $value;
}
break;
default:
$this->commandOptions[$option] = $value;
break;
}
}
return $this;
}