/** * Creates the sub-section configuration representation in case the * parse sub section feature is activated. * * @param Configuration $config The current configuration. * @param string $name The name of the current section. * @param string $value The value of the current section. * * @author Christian Achatz * @version * Version 0.1, 04.10.2010<br /> */ private function parseSubSection(Configuration &$config, $name, $value) { $dot = strpos($name, Configuration::SECTION_PATH_SEPARATOR); if ($dot === false) { $config->setValue($name, $value); } else { $subSectionName = substr($name, 0, $dot); $remainingName = substr($name, $dot + strlen(Configuration::SECTION_PATH_SEPARATOR)); if ($config->hasSection($subSectionName)) { $nextSection = $config->getSection($subSectionName); } else { $nextSection = new IniConfiguration(); } $this->parseSubSection($nextSection, $remainingName, $value); $config->setSection($subSectionName, $nextSection); } }