Builds configs by given files list.
@param null|array $files files to process: config name => list of files
502180
public function buildUserConfigs(array $files): array
    {
        $resolver = new Resolver($files);
        $files = $resolver->get();
        foreach ($files as $name => $paths) {
            $this->getConfig($name)->load($paths)->build()->write();
        }

        return $files;
    }
1257090
public static function init($init_config_files)
    {
        self::$settings = [];
        self::$default_dir = QP_CONFIG_PATH;

        foreach ($init_config_files as $filename) {
            self::addConfigFromFile($filename);
        }
    }
1138045
public function addServersFromFiles($files = [])
    {

        // Since we expect an array let us turn a string (i.e. single file) into an array
        if (!is_array($files)) {
            $files = [$files];
        }

        // Iterate over the file(s) and add them
        foreach ($files as $file) {
            // Check to make sure the file exists and we can read it
            if (!file_exists($file) || !is_readable($file)) {
                continue;
            }

            // See if this file is JSON
            if (($servers = json_decode(file_get_contents($file), true)) === null
                && json_last_error() !== JSON_ERROR_NONE
            ) {
                // Type not supported
                continue;
            }

            // Add this list of servers
            $this->addServers($servers);
        }

        return $this;
    }
146815
public static function loadFromFiles(array $files)
    {
        $checked_files = [];
        $configs = [];
        $config = [];
        foreach ($files as $idx => $file) {
            if (!file_exists($file) || !is_readable($file)) {
                throw new \Exception(__METHOD__ . " Cannot locate configuration file: $file");
            }
            $configs[$idx] = include $file;
            if (!$configs[$idx]) {
                throw new \Exception("Cannot parse or empty configuration file '$file' ([" . implode(',', $files) . "])");
            }
            if (!array_key_exists('openstore-akilia', $configs[$idx])) {
                throw new \Exception("Config file lacks a required 'openstore-akilia' top level key in file '$file'.");
            }

            $config = array_merge_recursive($config, $configs[$idx]['openstore-akilia']);
        }

        return new OpenstoreAkiliaSetup($config);
    }
797945
protected function iterateOverFiles($files)
    {
        foreach ($files as $file) {
            $file = $this->getFile($file);

            if ($namespace = $this->extractNamespace($file)) {
                $this->checkInstance($file, $namespace);
            }
        }
    }
1043140
public function load($files)
    {
        $files = (! is_array($files)) ? (array) $files : $files;

        foreach ($files as $file) {
            synapse()->brain->teach($file);
        }
    }
759871
public function createUploadedFiles(array $files){
        $instances = [];

        foreach($files as $name => $value){
            if($value instanceof UploadedFileInterface){
                $instances[$name]  = $value;
                continue;
            }

            if(!is_array($value)){
                $class  = UploadedFileInterface::class;

                throw new \InvalidArgumentException(
                    "The file list must be an associative array whose value is"
                    . " an instance of a class implementing {$class} or an array"
                    . " having file information."
                    . " But the value of index A does not apply to them."
                );
            }

            $instances[$name]  = isset($value["error"]) && isset($value["tmp_name"])
                ? $this->createUploadedFileWithNest($value)
                : $this->createUploadedFiles($value)
            ;
        }

        return $instances;
    }
1179985
public function requireFiles(array $files)
    {
        $path = $this->getPath();
        foreach ($files as $file) {
            $this->laravel['files']->requireOnce($path . '/' . $file . '.php');
        }
    }
437345
public function loadFiles($files)
    {
        $files = (array) $files;

        $success = true;
        foreach ($files as $file) {

            $this->loadFile($file);
        }
        return true;
    }
15052
protected function init(string $path, array $files = [])
    {
        static::$path = $path;
        $this->addConfigFile($files);
        $this->load();
    }
347348
protected function getFiles(array $files)
    {
        $filesEntity = [];

        foreach ($files as $file) {
            $filesEntity[] = new File($file);
        }

        return $filesEntity;
    }
47945
public function setTranslationFiles(array $files)
    {
        foreach ($files as $language => $languageFiles) {
            $language = (string) $language;
            if ($language === '') {
                throw new \InvalidArgumentException('$language cannot be empty');
            }

            if (!is_array($languageFiles)) {
                $languageFiles = [$languageFiles];
            }

            foreach ($languageFiles as $file) {
                if (!file_exists($file)) {
                    throw new \InvalidArgumentException('Translation file "'.$file.'" not found');
                }

                $this->files[$language][] = $file;
            }
        }
    }
984592
protected function GenerateConstantsClass($files) {
        if (count($files) > 0) {
            $classGen = new ConstantsClassGeneratorBase($this->params, $files);
            $classGen->BuildClass();
            return str_replace('\\', '/', "file://" . "APP_ROOT_DIR" . $this->params[BaseClassGenerator::NameSpaceKey] . "/" . $classGen->fileName);
        } else {
            return "No class to generate.";
        }
    }
123229
public function findRequiredFiles(array $files)
    {
        foreach ($files as $file) {
            if (file_exists($this->plugin->directory.'/'.$file)) {
                $this->addSuccess(sprintf('Found required file: %s', $file));
            } else {
                $this->addError(sprintf('Failed to find required file: %s', $file));
            }
        }
    }
31801
public function load(array $files, Config $config = null)
    {
        if (is_null($config)) {
            $config = new Config();
        }

        if (!$this->isValidFileList($files)) {
            throw new \RuntimeException('Invalid config file list given. At least one config file must exist.');
        }

        foreach ($files as $file) {
            if ($this->isFileExisting($file)) {
                $config->merge(
                    $this->loadFile($file)
                );
            }
        }

        return $config;
    }
208985
function setFiles($files)
    {
        $this->files = \Poirot\Http\Psr\normalizeFiles($files);
        return $this;
    }
875144
public function handleMultipleFiles(array $files)
    {
        foreach ($files as $file) {
            $this->handleSingleFile($file);
        }
        return $this->getUploadedFilesList();
    }