componentRegistrar = $componentRegistrar; $this->driver = $driver; } /** * If scope is module. * * @inheritdoc */ public function get($filename, $scope) { $iterator = $this->_moduleReader->getConfigurationFiles($filename)->toArray(); if ($scope !== self::ALL_MODULES) { $path = $this->componentRegistrar->getPath('module', $scope); $path .= '/' . Dir::MODULE_ETC_DIR . '/'. $filename; $iterator = isset($iterator[$path]) ? [$path => $iterator[$path]] : []; } $primaryFile = parent::get($filename, 'primary')->toArray(); if (!$this->driver->isFile(key($primaryFile))) { throw new \Exception("Primary db_schema file doesn`t exists"); } /** Load primary configurations */ $iterator += $primaryFile; return $iterator; } }