CoreFiles by mySites.guru
FileLoader.php51 lines, 1,319 bytes, from Joomla_5.4.11-Stable-Full_Package.zip
Raw History Compare with 5.4.10
md5
111dfc6e1def87239652e19e48f7f32e
sha1
bae9f9e3b5f5d86a07a70a45dfd6a3c64a0d1184
sha256
6a1e690adf4b8b0c9e77d4a8e63bd97730797b17f022bbc868c99d704c46239b
<?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;

use Symfony\Component\Validator\Exception\MappingException;

/**
 * Base loader for loading validation metadata from a file.
 *
 * @author Bernhard Schussek <[email protected]>
 *
 * @see YamlFileLoader
 * @see XmlFileLoader
 */
abstract class FileLoader extends AbstractLoader
{
    protected $file;

    /**
     * Creates a new loader.
     *
     * @param string $file The mapping file to load
     *
     * @throws MappingException If the file does not exist or is not readable
     */
    public function __construct(string $file)
    {
        if (!is_file($file)) {
            throw new MappingException(\sprintf('The mapping file "%s" does not exist.', $file));
        }

        if (!is_readable($file)) {
            throw new MappingException(\sprintf('The mapping file "%s" is not readable.', $file));
        }

        if (!stream_is_local($this->file)) {
            throw new MappingException(\sprintf('The mapping file "%s" is not a local file.', $file));
        }

        $this->file = $file;
    }
}

The same content is in 72 releases, Joomla 5.4.0-rc1 to 6.2.1. See them all, or every version of this file.