public function getProperty($variable, $defaultValue = null)
{
if (!array_key_exists($variable, $this->propertyCache)) {
$v = getopt("", ["{$variable}::"]);
if (isset($v[$variable])) {
$this->propertyCache[$variable] = $v[$variable];
} else {
$this->propertyCache[$variable] = $this->config->getNested($variable);
}
}
return $this->propertyCache[$variable] === null ? $defaultValue : $this->propertyCache[$variable];
}