function CompiledClassMetadataFactory::__construct
File
-
vendor/
symfony/ serializer/ Mapping/ Factory/ CompiledClassMetadataFactory.php, line 28
Class
- CompiledClassMetadataFactory
- @author Fabien Bourigault <bourigaultfabien@gmail.com>
Namespace
Symfony\Component\Serializer\Mapping\FactoryCode
public function __construct(string $compiledClassMetadataFile, ClassMetadataFactoryInterface $classMetadataFactory) {
if (!file_exists($compiledClassMetadataFile)) {
throw new \RuntimeException("File \"{$compiledClassMetadataFile}\" could not be found.");
}
$compiledClassMetadata = (require $compiledClassMetadataFile);
if (!\is_array($compiledClassMetadata)) {
throw new \RuntimeException(\sprintf('Compiled metadata must be of the type array, %s given.', \gettype($compiledClassMetadata)));
}
$this->compiledClassMetadata = $compiledClassMetadata;
}