schema
3 years ago
AbstractLoader.php
4 years ago
AnnotationLoader.php
1 year ago
AutoMappingTrait.php
1 year ago
FileLoader.php
4 years ago
FilesLoader.php
4 years ago
LoaderChain.php
4 years ago
LoaderInterface.php
4 years ago
PropertyInfoLoader.php
1 year ago
StaticMethodLoader.php
4 years ago
XmlFileLoader.php
4 years ago
XmlFilesLoader.php
4 years ago
YamlFileLoader.php
4 years ago
YamlFilesLoader.php
4 years ago
index.php
3 years ago
FileLoader.php
22 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Symfony\Component\Validator\Mapping\Loader; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Symfony\Component\Validator\Exception\MappingException; |
| 5 | abstract class FileLoader extends AbstractLoader |
| 6 | { |
| 7 | protected $file; |
| 8 | public function __construct(string $file) |
| 9 | { |
| 10 | if (!\is_file($file)) { |
| 11 | throw new MappingException(\sprintf('The mapping file "%s" does not exist.', $file)); |
| 12 | } |
| 13 | if (!\is_readable($file)) { |
| 14 | throw new MappingException(\sprintf('The mapping file "%s" is not readable.', $file)); |
| 15 | } |
| 16 | if (!\stream_is_local($this->file)) { |
| 17 | throw new MappingException(\sprintf('The mapping file "%s" is not a local file.', $file)); |
| 18 | } |
| 19 | $this->file = $file; |
| 20 | } |
| 21 | } |
| 22 |