private function getConfig() { // create config reader if is't created if ($this->configReader === null) { if ($this->configReaderConfig === null) { throw new RuntimeException('Config reader config should not empty'); } $configReaderConfig = $this->configReaderConfig; if (!isset($configReaderConfig['class'])) { throw new RuntimeException('You should specify config reader class'); } $configReaderClass = $configReaderConfig['class']; unset($configReaderConfig['class']); $this->configReader = $this->create($configReaderClass, $configReaderConfig); } return $this->configReader->getConfig(); }