You are here

abstract class FileLoader in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/dependency-injection/Loader/FileLoader.php \Symfony\Component\DependencyInjection\Loader\FileLoader
  2. 8 vendor/symfony/validator/Mapping/Loader/FileLoader.php \Symfony\Component\Validator\Mapping\Loader\FileLoader
  3. 8 vendor/symfony/serializer/Mapping/Loader/FileLoader.php \Symfony\Component\Serializer\Mapping\Loader\FileLoader
Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Mapping/Loader/FileLoader.php \Symfony\Component\Serializer\Mapping\Loader\FileLoader

Base class for all file based loaders.

@author Kévin Dunglas <dunglas@gmail.com>

Hierarchy

Expanded class hierarchy of FileLoader

1 string reference to 'FileLoader'
CrossCheckTest::testCrossCheck in vendor/symfony/dependency-injection/Tests/CrossCheckTest.php
@dataProvider crossCheckLoadersDumpers

File

vendor/symfony/serializer/Mapping/Loader/FileLoader.php, line 21

Namespace

Symfony\Component\Serializer\Mapping\Loader
View source
abstract class FileLoader implements LoaderInterface {

  /**
   * @var string
   */
  protected $file;

  /**
   * Constructor.
   *
   * @param string $file The mapping file to load
   *
   * @throws MappingException if the mapping file does not exist or is not readable
   */
  public function __construct($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));
    }
    $this->file = $file;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FileLoader::$file protected property
FileLoader::__construct public function Constructor.
LoaderInterface::loadClassMetadata public function Load class metadata.