private function addSomeSectionsToConfig(ConfigSection $section, $amount = 0, $mutable = false) { for ($i = 0; $i < $amount; $i++) { if ($mutable) { $name = $section->getSectionName() . '_' . $i; $section = new ConfigSection($name); } $this->object->addSection($section); } }
/** * Adds config section to sections container * * @param ConfigSection $section Config sections to add */ public function addSection(ConfigSection $section) { $this->config_sections[$section->getSectionName()] = $section; }