Nextras\Orm\Model\MetadataStorage::__construct PHP Méthode

__construct() public méthode

public __construct ( array $entityClassesMap, Cache $cache, Nextras\Orm\Entity\Reflection\IMetadataParserFactory $metadataParserFactory, Nextras\Orm\Model\IRepositoryLoader $repositoryLoader )
$entityClassesMap array
$cache Nette\Caching\Cache
$metadataParserFactory Nextras\Orm\Entity\Reflection\IMetadataParserFactory
$repositoryLoader Nextras\Orm\Model\IRepositoryLoader
    public function __construct(array $entityClassesMap, Cache $cache, IMetadataParserFactory $metadataParserFactory, IRepositoryLoader $repositoryLoader)
    {
        static::$metadata = $cache->derive('metadata')->load($entityClassesMap, function (&$dp) use($entityClassesMap, $metadataParserFactory, $repositoryLoader) {
            $metadata = [];
            $annotationParser = $metadataParserFactory->create($entityClassesMap);
            foreach (array_keys($entityClassesMap) as $className) {
                $metadata[$className] = $annotationParser->parseMetadata($className, $dp[Cache::FILES]);
            }
            $validator = new MetadataValidator();
            $validator->validate($metadata, $repositoryLoader);
            return $metadata;
        });
    }
MetadataStorage