Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeclarationInstaller.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Setup\Model;
7 
11 
16 {
20  private $operationsExecutor;
21 
25  private $schemaDiff;
26 
30  private $schemaConfig;
31 
39  public function __construct(
40  SchemaConfigInterface $schemaConfig,
41  SchemaDiff $schemaDiff,
42  OperationsExecutor $operationsExecutor
43  ) {
44  $this->operationsExecutor = $operationsExecutor;
45  $this->schemaConfig = $schemaConfig;
46  $this->schemaDiff = $schemaDiff;
47  }
48 
55  public function installSchema(array $requestData)
56  {
57  $declarativeSchema = $this->schemaConfig->getDeclarationConfig();
58  $dbSchema = $this->schemaConfig->getDbConfig();
59  $diff = $this->schemaDiff->diff($declarativeSchema, $dbSchema);
60  $this->operationsExecutor->execute($diff, $requestData);
61  }
62 }
__construct(SchemaConfigInterface $schemaConfig, SchemaDiff $schemaDiff, OperationsExecutor $operationsExecutor)