fileResolver = $fileResolver; $this->areaList = $areaList; } /** * Scan configuration files * * @param string $fileName * * @return array array of paths to the configuration files */ public function scan($fileName) { $files = []; $areaCodes = array_merge( ['primary', Area::AREA_GLOBAL], $this->areaList->getCodes() ); foreach ($areaCodes as $area) { $files = array_merge_recursive( $files, $this->fileResolver->get($fileName, $area)->toArray() ); } return array_keys($files); } }