CoreFiles by mySites.guru
FilesLoader.php55 lines, 1,302 bytes, from Joomla_5.2.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 5.2.0-alpha1
md5
2a45c49f68139cca44e91af039126fa5
sha1
eb619244f17f9785f70c31ee781bebf0c53ca11b
sha256
f7983e94fd5f0a80a926fb062c57fbe4348486569ce045a9d34d52a8624ee137
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Validator\Mapping\Loader;

/**
 * Base loader for loading validation metadata from a list of files.
 *
 * @author Bulat Shakirzyanov <[email protected]>
 * @author Bernhard Schussek <[email protected]>
 *
 * @see YamlFilesLoader
 * @see XmlFilesLoader
 */
abstract class FilesLoader extends LoaderChain
{
    /**
     * Creates a new loader.
     *
     * @param array $paths An array of file paths
     */
    public function __construct(array $paths)
    {
        parent::__construct($this->getFileLoaders($paths));
    }

    /**
     * Returns an array of file loaders for the given file paths.
     *
     * @return LoaderInterface[]
     */
    protected function getFileLoaders(array $paths): array
    {
        $loaders = [];

        foreach ($paths as $path) {
            $loaders[] = $this->getFileLoaderInstance($path);
        }

        return $loaders;
    }

    /**
     * Creates a loader for the given file path.
     */
    abstract protected function getFileLoaderInstance(string $path): LoaderInterface;
}

The same content is in 135 releases, Joomla 5.1.0-beta1 to 6.2.1. See them all, or every version of this file.