public function addConfigParser(ParserInterface $configParser) { if ($this->mainConfigParser !== null) { throw new RuntimeException('Main config parser is already instantiated'); } $this->configParsers[] = $configParser; }