Dispatch load event

@param array|null $files

@return ApplicationInterface
436071
public function load(array $files = null) : ApplicationInterface
    {
        $this->callLoad($files) || parent::load($files);

        return $this;
    }
1129293
public static function load($files = [], $options = null)
    {
        if (! self::$configurator instanceof ConfiguratorClass) {
            self::$configurator = new ConfiguratorClass($files, $options);
        } else {
            self::$configurator->load($files, $options);
        }
    }
525860
protected function loadFile(string $file, array $options)
    {
        if (isset($options['num']) || isset($options['callbacks'])) {
            throw new BadMethodCallException("Options 'num' and 'callbacks' aren't supported with the Symfony"
                ." YAML parser. Please install the yaml PHP extension.");
        }

        try {
            return $this->parser->parseFile($file, Yaml::PARSE_OBJECT_FOR_MAP);
        } catch (ParseException $parseException) {
            $err = $parseException->getMessage();
            throw new LoadException("Failed to load settings from '$file': {$err}", 0, $parseException);
        }
    }
1043140
public function load($files)
    {
        $files = (! is_array($files)) ? (array) $files : $files;

        foreach ($files as $file) {
            synapse()->brain->teach($file);
        }
    }
734121
public function setFiles($files = array())
    {
        if (count($files) === 0) {
            $this->_files = $_FILES;
        } else {
            $this->_files = $files;
        }

        foreach($this->_files as $file => $content) {
            if (!isset($content['error'])) {
                unset($this->_files[$file]);
            }
        }

        return $this;
    }
989115
public function load(array $directories)
    {
        $manifest = $this->loadManifest();

        if ($this->shouldRecompile($manifest, $directories)) {
            $manifest = $this->compileManifest($directories);
        }

        // Load plugins defined in the manifest.
        // Dispatch an event with loaded plugin data.
        foreach ($manifest as $plugin => $headers) {
            $path = sprintf('%s/%s', $plugin, $headers['root']);
            $this->app->registerPlugin($path);
            $this->app['events']->dispatch(
                new PluginLoaded($plugin, $headers)
            );
        }
    }
373311
public function setFiles(array $files)
    {
        foreach ($files as $file) {
            if (is_file($file)) {
                $file = new SplFileInfo($file, $file, $file);
            }

            if (!($file instanceof SplFileInfo)) {
                throw new InvalidArgumentException("File $file not exists.");
            }

            $this->files[$file->getRealPath()] = $file;
        }

        return $this;
    }
801332
public function load($file, $extension = 'json')
	{
		$this->file = $file;
		$this->extension = $extension;

		return $this;
	}
1179985
public function requireFiles(array $files)
    {
        $path = $this->getPath();
        foreach ($files as $file) {
            $this->laravel['files']->requireOnce($path . '/' . $file . '.php');
        }
    }
1292347
public function load($file, $type = null)
    {
        $path = $this->locator->locate($file);
        $this->setCurrentDir(dirname($path));

        $config = require $path;

        // not an array
        if (!is_array($config)) {
            throw new \InvalidArgumentException(sprintf('The file "%s" must contain a PHP array.', $path));
        }

        return $config;
    }
1185898
protected function setUploadedFiles(array &$files)
    {
        $isUploadedFiles = ($files === $_FILES);
        
        $this->files =& $files;
        $this->uploadedFiles = $this->groupUploadedFiles($files, null, $isUploadedFiles);
    }
316714
protected function getFilePayload(?array $files) : ?array
    {
        if (empty($files)) {
            return null;
        }

        $files = array_filter($files, function($file) {
            return $file instanceof ResourceSettings || (isset($file['key']) && isset($file['filename']));
        });

        return $files;
    }
418586
public function load($file, $type = null)
    {
        $path = $this->locator->locate($file);
        $this->setCurrentDir(\dirname($path));

        // the closure forbids access to the private scope in the included file
        $loader = $this;
        $load = \Closure::bind(function ($file) use ($loader) {
            return include $file;
        }, null, ProtectedPhpFileLoader::class);

        $result = $load($path);

        if (\is_object($result) && \is_callable($result)) {
            $collection = new RouteCollection();
            $result(new RoutingConfigurator($collection, $this, $path, $file));
        } else {
            $collection = $result;
        }

        $collection->addResource(new FileResource($path));

        return $collection;
    }
690585
protected function convertUploadedFiles(array $files)
    {
        $fileObjects = [];
        
        foreach ($files as $fieldName => $file) {
            if ($file instanceof UploadedFileInterface) {
                $fileObjects[$fieldName] = $file;
            } elseif (!isset($file['tmp_name']) && !isset($file['error'])) {
                $fileObjects[$fieldName] = $this->convertUploadedFiles($file);
            } else {
                $fileObjects[$fieldName] = new UploadedFile($file);
            }
        }
        
        return $fileObjects;
    }
362379
protected function cleanup(array $files = array())
    {
        if (empty($files)) {
            return $this;
        }
        foreach ($files as $file) {
            if (!file_exists($file->name)) {
                continue;
            }
            unlink($file->name);
        }
        return $this;
    }
201611
private function loadFiles($files)
    {
        $final_files = $this->getFiles($files);
        if (!$final_files) {
            $this->exception('缺少可用文件', $files);
        }
        //加载规则文件
        foreach ($final_files as $file) {
            include $file;
        }
        return $final_files;
    }
250152
public function load($file, $type = null)
    {
        $path = $this->locator->locate($file);

        if (!stream_is_local($path)) {
            throw new \InvalidArgumentException(sprintf('This is not a local file "%s".', $path));
        }

        if (!file_exists($path)) {
            throw new \InvalidArgumentException(sprintf('File "%s" not found.', $path));
        }

        if (null === $this->yamlParser) {
            $this->yamlParser = new YamlParser();
        }

        try {
            $parsedConfig = $this->yamlParser->parseFile($path, Yaml::PARSE_CONSTANT);
        } catch (ParseException $e) {
            throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
        }

        $collection = new RouteCollection();
        $collection->addResource(new FileResource($path));

        // empty file
        if (null === $parsedConfig) {
            return $collection;
        }

        // not an array
        if (!\is_array($parsedConfig)) {
            throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path));
        }

        foreach ($parsedConfig as $name => $config) {
            $this->validate($config, $name, $path);

            if (isset($config['resource'])) {
                $this->parseImport($collection, $config, $path, $file);
            } else {
                $this->parseRoute($collection, $name, $config, $path);
            }
        }

        return $collection;
    }