/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Model/ResourceModel/Db/ValidateDataIntegrity.php
64 строки
2 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2016 Adobe * All Rights Reserved. */ namespace Magento\Framework\Model\ResourceModel\Db; use Magento\Framework\EntityManager\MetadataPool; use Magento\Framework\EntityManager\HydratorPool; /** * Class ValidateDataIntegrity */ class ValidateDataIntegrity { /** * @var MetadataPool */ private $metadataPool; /** * @var HydratorPool */ private $hydratorPool; /** * @var ObjectRelationProcessor */ private $objectRelationProcessor; /** * ValidateDataIntegrity constructor. * * @param MetadataPool $metadataPool * @param HydratorPool $hydratorPool * @param ObjectRelationProcessor $objectRelationProcessor */ public function __construct( MetadataPool $metadataPool, HydratorPool $hydratorPool, ObjectRelationProcessor $objectRelationProcessor ) { $this->metadataPool = $metadataPool; $this->hydratorPool = $hydratorPool; $this->objectRelationProcessor = $objectRelationProcessor; } /** * @param string $entityType * @param object $entity * @throws \Exception * @return void */ public function execute($entityType, $entity) { $metadata = $this->metadataPool->getMetadata($entityType); $hydrator = $this->hydratorPool->getHydrator($entityType); $this->objectRelationProcessor->validateDataIntegrity( $metadata->getEntityTable(), $hydrator->extract($entity) ); } }