abstract class FileLoader in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/symfony/dependency-injection/Loader/FileLoader.php \Symfony\Component\DependencyInjection\Loader\FileLoader
- 8.0 vendor/symfony/validator/Mapping/Loader/FileLoader.php \Symfony\Component\Validator\Mapping\Loader\FileLoader
- 8.0 vendor/symfony/serializer/Mapping/Loader/FileLoader.php \Symfony\Component\Serializer\Mapping\Loader\FileLoader
Same name and namespace in other branches
- 8 vendor/symfony/validator/Mapping/Loader/FileLoader.php \Symfony\Component\Validator\Mapping\Loader\FileLoader
Base loader for loading validation metadata from a file.
@author Bernhard Schussek <bschussek@gmail.com>
Hierarchy
- class \Symfony\Component\Validator\Mapping\Loader\AbstractLoader implements LoaderInterface
- class \Symfony\Component\Validator\Mapping\Loader\FileLoader
Expanded class hierarchy of FileLoader
See also
1 string reference to 'FileLoader'
- CrossCheckTest::testCrossCheck in vendor/
symfony/ dependency-injection/ Tests/ CrossCheckTest.php - @dataProvider crossCheckLoadersDumpers
File
- vendor/
symfony/ validator/ Mapping/ Loader/ FileLoader.php, line 24
Namespace
Symfony\Component\Validator\Mapping\LoaderView source
abstract class FileLoader extends AbstractLoader {
/**
* The file to load.
*
* @var string
*/
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($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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractLoader:: |
protected | property | ||
AbstractLoader:: |
protected | function | Adds a namespace alias. | |
AbstractLoader:: |
constant | The namespace to load constraints from by default. | ||
AbstractLoader:: |
protected | function | Creates a new constraint instance for the given constraint name. | |
FileLoader:: |
protected | property | The file to load. | |
FileLoader:: |
public | function | Creates a new loader. | |
LoaderInterface:: |
public | function | Loads validation metadata into a {@link ClassMetadata} instance. | 10 |