protected function getFromConfiguration($path)
{
$path = trim($path, '/');
$value = $this->getDefaultValue($path);
$configuration = $this->configuration;
$segments = explode('/', $path);
$segmentCount = count($segments);
for ($currentSegmentNumber = 0; $currentSegmentNumber < $segmentCount; $currentSegmentNumber++) {
$key = $segments[$currentSegmentNumber];
if ($currentSegmentNumber < $segmentCount - 1) {
// Must be an array
if (isset($configuration[$key]) && is_array($configuration[$key])) {
$configuration = $configuration[$key];
} else {
break;
}
} elseif (isset($configuration[$key])) {
$value = $configuration[$key];
}
}
return $value;
}