Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/magento/framework/Setup/Declaration/Schema/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/magento/framework/Setup/Declaration/Schema/SchemaConfig.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Framework\Setup\Declaration\Schema;

use Magento\Framework\Config\FileResolverByModule;
use Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder as DbSchemaBuilder;
use Magento\Framework\Setup\Declaration\Schema\Declaration\SchemaBuilder as DeclarativeSchemaBuilder;
use Magento\Framework\Setup\Declaration\Schema\Declaration\ReaderComposite;
use Magento\Framework\Setup\Declaration\Schema\Dto\SchemaFactory;

/**
 * {@inheritdoc}
 */
class SchemaConfig implements SchemaConfigInterface
{
    /**
     * @var DbSchemaBuilder
     */
    private $dbSchemaBuilder;

    /**
     * @var DeclarativeSchemaBuilder
     */
    private $declarativeSchemaBuilder;

    /**
     * @var SchemaFactory
     */
    private $schemaFactory;

    /**
     * @var ReaderComposite
     */
    private $readerComposite;

    /**
     * Constructor.
     *
     * @param DbSchemaBuilder          $dbSchemaBuilder
     * @param DeclarativeSchemaBuilder $declarativeSchemaBuilder
     * @param SchemaFactory            $schemaFactory
     * @param ReaderComposite          $readerComposite
     */
    public function __construct(
        DbSchemaBuilder $dbSchemaBuilder,
        DeclarativeSchemaBuilder $declarativeSchemaBuilder,
        SchemaFactory $schemaFactory,
        ReaderComposite $readerComposite
    ) {
        $this->dbSchemaBuilder = $dbSchemaBuilder;
        $this->declarativeSchemaBuilder = $declarativeSchemaBuilder;
        $this->schemaFactory = $schemaFactory;
        $this->readerComposite = $readerComposite;
    }

    /**
     * @inheritdoc
     */
    public function getDbConfig()
    {
        $schema = $this->schemaFactory->create();
        $schema = $this->dbSchemaBuilder->build($schema);
        return $schema;
    }

    /**
     * @inheritdoc
     */
    public function getDeclarationConfig()
    {
        $schema = $this->schemaFactory->create();
        $data = $this->readerComposite->read(FileResolverByModule::ALL_MODULES);
        $this->declarativeSchemaBuilder->addTablesData($data['table']);
        $schema = $this->declarativeSchemaBuilder->build($schema);
        return $schema;
    }
}

Spamworldpro Mini