/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
setup/src/Magento/Setup/Model/DeclarationInstaller.php
62 строки
2 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 11:23
22 окт 2025, 11:23
6c2f6e6
Код
Авторство
О чём код?
<?php /** * Copyright 2017 Adobe * All Rights Reserved. */ namespace Magento\Setup\Model; use Magento\Framework\Setup\Declaration\Schema\Diff\SchemaDiff; use Magento\Framework\Setup\Declaration\Schema\OperationsExecutor; use Magento\Framework\Setup\Declaration\Schema\SchemaConfigInterface; /** * Declaration Installer is facade for installation and upgrade db in declaration mode. */ class DeclarationInstaller { /** * @var OperationsExecutor */ private $operationsExecutor; /** * @var SchemaDiff */ private $schemaDiff; /** * @var SchemaConfigInterface */ private $schemaConfig; /** * Constructor. * * @param SchemaConfigInterface $schemaConfig * @param SchemaDiff $schemaDiff * @param OperationsExecutor $operationsExecutor */ public function __construct( SchemaConfigInterface $schemaConfig, SchemaDiff $schemaDiff, OperationsExecutor $operationsExecutor ) { $this->operationsExecutor = $operationsExecutor; $this->schemaConfig = $schemaConfig; $this->schemaDiff = $schemaDiff; } /** * Install Schema in declarative way. * * @param array $requestData -> Data params which comes from UI or from CLI. * @return void */ public function installSchema(array $requestData) { $declarativeSchema = $this->schemaConfig->getDeclarationConfig(); $dbSchema = $this->schemaConfig->getDbConfig(); $diff = $this->schemaDiff->diff($declarativeSchema, $dbSchema); $this->operationsExecutor->execute($diff, $requestData); } }